是否可以更改rich:simpleTogglePanel的标题样式?标题的字体总是“粗体”,我希望它是正常的。
我尝试使用style属性:style =“font-weight:normal”没有结果。
有什么想法吗?
答案 0 :(得分:0)
您是否尝试将!important
放在样式定义的末尾(即style="font-weight:normal !important;"
)?
另外,正如我相信你知道的,通常最好在单独的样式表中指定你的样式。我已经以这种方式定制<rich:extendedDataTable
(不确定这是否是黑客攻击,但它对我来说很有用)。在浏览器中打开您的页面然后破解开发人员工具(在安装了FireBug的Firefox中按F12,或者在Chrome中右键单击rich:SimpleTogglePanel
并单击“检查元素”。这将让您看到CSS定义名称由RichFaces框架使用。只需创建一个新的.css文件,并使用RichFaces使用的名称定义所需的样式。
/*This class defines styles for a table cell.*/
/*tableBorderWidth, tableBorderColor border-bottom*/
/*tableBorderWidth, tableBorderColor border-right*/
.rf-edt-c {
border-bottom: 1px solid #021e2f;
border-right: 1px solid #021e2f;
height: auto !important;
min-height: 26px;
}
正如您所看到的,您可能还需要在其中指定!important
标记,但它会将样式保留在您的网页之外...
希望这有帮助。