![](/img/trans.png)
[英]how to override primefaces component inline style without using !important in css?
[英]Override CSS style behaviour without using !important or inline style sheet
我正面临着css覆盖的问题。 下面的css应用于文本框(使用类xdTextBox)
.xdTextBox {
padding:1px;
line-height:10px;
border:2px #cc0 solid;
}
input[type="text"] {
padding:10px;
margin:10px;
line-height:15px;
border:none;
}
我希望结果为带填充的文本框:1px,line-height:10px,border:2px#cc0 solid;
我不能使用!重要或内联样式表
可能吗 ? 请建议您的解决方案
提前致谢
制定更优先级的一般想法是为其添加更多特定的选择器。
HTML:
<input type="text" class="xdTextBox" name="exmapleInput" />
CSS:
input[type="text"].xdTextBox {
padding:1px;
line-height:10px;
border:2px #cc0 solid;
}
进一步阅读: 查看CSS样式优先级
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.