我有一个 JSF 元素,我想设计我的 xhtml 页面的样式。 我包括我的 css 使用:
<h:head>
<h:outputStylesheet name="master.css" library="css" />
</h:head>
我的 css 位于 WebContent/resources/css/master.css 及其下 实际上就是这样:
#page{
width:800px;
height:800px;
margin:0 auto;
}
#header{
width:100%;
height:100px;
border:1px solid #000;
margin-bottom:16px;
}
#content{
width:100%;
height:300px;
margin-right:16px;
margin-bottom:16px;
border:1px solid #000;
}
#footer{
width:100%;
height:100px;
border:1px solid #000;
}
当我将内容部分的高度更改为 600px 时 在启动我的 glassfish 并部署我的之后真的没有任何改变 元素。我重新启动了 eclipse,我什至重新启动了我的电脑 在我改变了我的CSS之后。当我删除我的 css 时,所有样式都消失了,所以 它被正确呈现。当我重新包含我的 CSS 时,他仍然只是显示 300 像素代替我的 600 像素。
有什么问题吗?
最佳答案
刷新浏览器缓存 - Ctrl + F5
关于css - JSF 不更新 CSS 中的更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20076217/