【问题标题】:Changing the rich:simpleTogglePanel header style更改 rich:simpleTogglePanel 标题样式
【发布时间】:2011-09-15 16:58:47
【问题描述】:

是否可以更改rich:simpleTogglePanel 的标题样式?页眉的字体总是“粗体”,我希望它是正常的。

我用这种方式尝试了 style 属性:style="font-weight:normal" 没有结果。

有什么想法吗?

【问题讨论】:

    标签: java css jsf richfaces


    【解决方案1】:

    您是否尝试过将!important 放在样式定义的末尾(即style="font-weight:normal !important;")?

    另外,我相信您知道,通常最好在单独的样式表中指定您的样式。我已经以这种方式自定义了<rich:extendedDataTable(不确定这是否是一个hack,但它对我很有用)。在浏览器中打开您的页面,然后打开开发者工具(在安装了 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 标记,但它会将样式保留在页面之外...

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-08
      • 1970-01-01
      • 2012-10-08
      • 2016-09-17
      • 2017-08-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多