-3
我正在使用primefaces我想把我所有的CSS放在一个单独的文件css中。当我把我的风格在同一个页面的XHTML,它的工作与我一样:div元素无法加载css文件
<h:body>
<div style="height:200px;width:100%;background-color:#E9F3FF">
</div>
</h:body>
但是当我把我的CSS在一个单独的文件是不能和我一起工作,就像
<h:body>
<h:outputStylesheet library="css" name="style.css" />
<div class="index_center_text">
</div>
</h:body>
或
<h:head>
<h:link rel="stylesheet" type="text/css" href="/resources/css/style.css" />
<h:body>
<div class="index_center_text">
</div>
</h:body>
的style.css:
.index_center_text {
height:200px;
width:100%;
background-color:#E9F3FF
}
文件夹结构
WebContent
|-- META-INF
|-- resources
| |-- css
| | `-- style.css
| `-- images
| |-- logo.png
|-- WEB-INF
| |-- lib
| |-- faces-config.xml
| |-- web.xml
|
|-- index.xhtml
请任何人能帮助我!
@匿名你是对的,你有回答请 – laciane
不,我从来没有使用过这种语言。我只会说你的道路可能是错的,但看起来你已经检查过了。不过,再次发布相同的问题并不好。 – Anonymous
如果你想更多的关注一个问题,你可以阅读[这个元问题](http://meta.stackexchange.com/questions/7046/how-do-i-get-attention-for-old-unanswered -questions)。 – Anonymous