Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
div元素无法加载css文件_Css_Jsf 2_Primefaces_Load - Fatal编程技术网

div元素无法加载css文件

div元素无法加载css文件,css,jsf-2,primefaces,load,Css,Jsf 2,Primefaces,Load,我使用的是primefaces,我想把我所有的css放在一个单独的css文件中。当我将我的样式放在同一个页面xhtml中时,它会与我一起工作,比如: <h:body> <div style="height:200px;width:100%;background-color:#E9F3FF"> </div> </h:body> } 文件夹结构 WebContent |-- META-INF |-- resources |

我使用的是primefaces,我想把我所有的css放在一个单独的css文件中。当我将我的样式放在同一个页面xhtml中时,它会与我一起工作,比如:

<h:body>

    <div style="height:200px;width:100%;background-color:#E9F3FF">

    </div>
</h:body>
}

文件夹结构

WebContent
 |-- META-INF
 |-- resources
 |    |-- css
 |    |    `-- style.css
 |    `-- images
 |         |-- logo.png
 |-- WEB-INF
 |    |-- lib
 |    |-- faces-config.xml
 |    |-- web.xml
 |         
 |-- index.xhtml

请任何人都可以帮助我

这应该适合你

<h:head>
<link rel="stylesheet" type="text/css" href="resources/css/style.css"/>
</h:head>

@匿名你说得对,你有答案吗?不,我从来没用过那种语言。我只想说你的道路可能是错误的,但你似乎已经检查过了。不过,再次发布同一个问题是不好的。如果你想吸引更多的注意力,你可以阅读。好的,非常感谢@Anonymousfirst,谢谢你的重播。我试过了,但还是不行
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
<h:head>
<link rel="stylesheet" type="text/css" href="resources/css/style.css"/>
</h:head>