如何覆盖PrimeFaces的样式表? [英] How to override stylesheets of PrimeFaces?
本文介绍了如何覆盖PrimeFaces的样式表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
只是我试图通过FireBug生成的HTML中查找一个组件的名称,之后我改变它在我手动定义的CSS在JSF项目,但不能覆盖PrimeFaces的CSS定义。提前感谢任何想法。
Simply i tried to look the name of a component in generated HTML through FireBug after that i change it in my manually defined css in JSF project, but could not override the PrimeFaces' CSS definition. Thanks in advance for any idea.
推荐答案
如果使用primefaces 2.2.1,请使用h:outputStylesheet标记,
If using primefaces 2.2.1, Use the h:outputStylesheet tag and include it in h:body not in h:head to override primefaces stylesheets, same with h:outputScript.
示例:
<h:body>
<h:outputStylesheet library="css" name="YOURSTYLES.css" />
<h:outputScript library="javascript" name="YOURSCRIPT.js" target="head" />
</h:body>
如果使用primefaces 3,请按照此博客条目
http://blog.primefaces.org/?p=1433
If using primefaces 3, follow this blog entry http://blog.primefaces.org/?p=1433
这篇关于如何覆盖PrimeFaces的样式表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文