【问题标题】:Want to know how I can change the header through the tabview style property? [duplicate]想知道如何通过 tabview 样式属性更改标题? [复制]
【发布时间】:2019-09-13 15:43:45
【问题描述】:

我正在做一个项目,使用:jsf、primefaces、css 布局编辑... 我只需要更改一个选项卡视图的背景,而不影响项目中的所有其他选项卡视图。 我知道有一个属性:.ui-widget-header。 如果我在 css 文件中更改此属性,则所有标题都会更改。 想知道如何通过 tabview 样式属性更改加热器?

我在 css 中尝试过,但它改变了所有标题:

 .ui-widget-header {
      border: 1px solid #56585C;
      background: #424548;
      color: #F9F7F7;
      font-weight: bold;
    }

我的目标是在不影响主 tabView 的情况下从另一个 tabView 中包含的 tabView 获取背景

【问题讨论】:

  • 您的问题中没有纯 java,请从标签中删除 ot
  • 谢谢! @Kukeltje

标签: css primefaces tabview


【解决方案1】:

给你的 tabView 一个类:

<p:tabView styleClass="certain-tabview-class"

使用 CSS 后代选择器仅设置具有此类的 tabView 的样式:

.certain-tabview-class .ui-widget-header {

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2018-10-16
  • 2011-01-01
  • 2020-02-11
  • 2021-11-20
  • 2012-10-13
  • 1970-01-01
相关资源
最近更新 更多