3

PrimeFaces のパネル グリッドの背景は常に白ですが、 を使用してクラスstyleClassの CSS コードを変更し、,または. 何も機能しませんでした。ui-panelgridstylep:panelGridp:rowp:column

試した:

p:column style="background-color: transparent !important;"

また

.ui-panelgrid, .ui-panelgrid td { background-color: transparent !important; }

スクリーンショット:

灰色の背景を持つ div 内の白い背景を持つ panelGrid

4

2 に答える 2

10

p:panelGrid 境界線の削除に関する関連する質問のおかげで、td と tr の両方をオーバーライドする必要があることがわかりました。背景が削除されました。境界線が削除されました。:)

.noBorder tr,
.noBorder td { border: 0 !important; }

.transparentBackground tr,
.transparentBackground td { background: transparent !important; }

前のコードが不要な変更を行ったため、カスタム クラスを作成しました。

于 2014-03-29T00:41:33.697 に答える