【问题标题】:how to style an <h:inputText> with CSS [duplicate]如何使用 CSS 为 <h:inputText> 设置样式 [重复]
【发布时间】:2021-09-30 19:12:39
【问题描述】:

所以我正在尝试设置我的 inputText 的样式,但它不起作用 这是我的 XHTML 代码

<h:form>
   <h:panelGrid columns="1" styleClass="contactform">
       <h:inputText value="#{formateurController.formateur.nom}"  class="text-input" a:placeholder="Nom"  />
//rest of the form 
     <h:panelGrid>  
</h:form> 

还有我的CSS

.contactform .text-input{
  border-radius: 10px;
  box-shadow: none;
  font-family: poppins;
  font-size: 14px;
}
.contactform .text-input:focus{
     border-color: #d9232d;
}

【问题讨论】:

    标签: jsf


    【解决方案1】:

    JSF 组件中没有类属性。

    您应该在 标记中将属性“class”替换为“styleClass”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-04
      • 1970-01-01
      • 2021-12-08
      • 2019-09-24
      • 2016-07-30
      • 2013-12-11
      相关资源
      最近更新 更多