3 回答
TA贡献1821条经验 获得超6个赞
<h:outputStyleSheet>
FacesServlet
/javax.faces.resource/*
<link>
url()
#{resource['library:location']}
.c2 { background: url("/resources/images/smiley.jpg"); }
.c2 { background: url("#{resource['images/smiley.jpg']}"); }
playground
FacesServlet
*.xhtml
.c2 { background: url("/playground/javax.faces.resource/images/smiley.jpg.xhtml");}
:
primefaces-start
.c2 { background: url("#{resource['primefaces-start:images/ui-bg_gloss-wave_50_6eac2c_500x100.png']}"); }
.c2 { background: url("/playground/javax.faces.resource/images/ui-bg_gloss-wave_50_6eac2c_500x100.png.xhtml?ln=primefaces-start");}
另见:
如何引用Facelets模板中的CSS/JS/图像资源?
将JSF前缀更改为后缀映射迫使我在CSS背景图像上重新应用映射
不相干library
library
library
<h:outputStylesheet>
#{resource}
.
<h:outputStylesheet name="css/style.css" />
另见:
JSF资源库的用途是什么,应该如何使用它?
TA贡献1877条经验 获得超1个赞
<input type="submit" name="j_idt15" value="" class="c2">
<input type="image" src="/demoapp/resources/images/smiley.jpg" name="j_idt14">
添加回答
举报