1

私は Primefaces 3.1 を使用しており、ボタンのカスタム css を実装しようとしています。

私のページは次のように定義されています:

<h:head>
<title>Primefaces 3.1</title>
<f:facet name="last">             
    <meta http-equiv="X-UA-Compatible" content="EmulateIE8" /> 
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>                           
    <link type="text/css" rel="stylesheet" href="../resources/Styles/stylesheet.css" />
    <link rel="stylesheet" href="../resources/Styles/pfOverride.css" type="text/css" />
    </f:facet> 
</h:head>

CommandButton は次のようになります。

<p:commandButton id="button1" styleClass="custButton"....

pfOverride.css には次のものがあります。

.ui-button {
    background-color: #b2f5g3;
    border-color: black;    
}

.ui-button-text {
    background-color: #b2f5g3;
.ui-button-text-only .ui-button-text {
    font-size: 9pt; 
    color: black;
}

custButton にも異なる値が設定されており、

私の問題は、 pfoverride.css は機能していますが、スタイルシートは機能していません。私が行方不明または間違っていることを誰かに教えてもらえますか!important?

どんな助けでも大歓迎です。

4

1 に答える 1

1

に右括弧を追加し.ui-button-text、正しい 16 進数値 (gは 16 進数ではありません)を使用すると、これが機能するはずです。

.ui-button-text {
    background-color: #b2f5f3;
}
.ui-button-text-only .ui-button-text {
    font-size: 9pt; 
    color: black;
}
于 2012-05-11T06:46:00.977 に答える