使用< h:head>时,不会应用自定义CSS.代替< head> [英] Custom CSS doesn't get applied when using <h:head> instead of <head>
问题描述
如果我放:
<head>
//..
</head>
<body>
//..
</body>
我的CSS样式正确应用,但是当我更改为:
The style from my CSS is applied correctly, but when I change to :
<h:head>
//..
</h:head>
<h:body>
//..
</h:body>
我的风格在CSS的某些部分看来是错误的.
My style it seems wrong some parts of CSS.
为什么会这样?
更新: 为了简化我的问题,我在下面显示两个图像:
Update: To simplify my problem i'm show two images below:
没有
<h:head>.. <h:body>
(这是正确的CSS样式)
<h:head>.. <h:body>
(this is the correct CSS style)
使用
<h:head>..<h:body>
我只是更改为和相同,并且发生此错误.
I just change to and the same thing to and this error happens.
我对JSF还是陌生的,我需要做些什么吗?
I'm new about JSF, there's something that i have to do ?
更新2: 我正在使用Rich Faces 4,我意识到的一件事是,在标记的末尾出现了一个脚本:
Update 2: I'm using Rich Faces 4, one thing that i realized was that appears one script include in the end of tag:
<link type="text/css" rel="stylesheet" href="/brainset/rfRes/skinning.ecss.xhtml?db=eAHL6rC8BQAEkAIG">
我没有提出,只出现在
> <h:head> ... <h:body>
标签. 我认为RichFaces覆盖了我的样式,包括"skinning.ecss".
tags. I think that my style is overridden by RichFaces include this 'skinning.ecss'.
推荐答案
RichFaces 4被我的样式覆盖,因此要禁用蒙皮,我们必须使用以下参数:
The RichFaces 4 was overridden my style,so to disable skinning we have to use parameters as below:
<context-param>
<param-name>org.richfaces.skin</param-name>
<param-value>plain</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.enableControlSkinning</param-name>
<param-value>false</param-value>
</context-param>
这解决了我的问题;)
这篇关于使用< h:head>时,不会应用自定义CSS.代替< head>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!