如何在多个jsps中包含css? [英] How to include css in mulitple jsps?
本文介绍了如何在多个jsps中包含css?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有几个CSS样式,我需要包括在JSP页面,但是,我有多个JSP,我包括在一个主JSP。我不能修改主JSP,但只能将它们放入包含的JSP。
i have several CSS styles i would need to include in the JSP page, however, i have multiple JSP where i include in a main JSP. I can't modify the main JSP, but only be able to put them into the included JSPs.
我可能知道我是否可以在每个JSP中都有一个标签,以便我可以将我的页面级CSS?
May i know if i may have a tag in each JSP so that i may put my page level CSS?
<head>
<style type="text/css">
.oneOffcosts_totalDescription{
color: #006685;
margin-left:35px;
border:1px solid #dedede;
width:300px;
float:left;
display:inline;
}
.oneOffcosts_totalCost{
font-weight:bold;
border:1px solid #dedede;
width:100px;
float:left;
display:inline;
}
</style>
</head>
$ b
谢谢!
Thanks!
推荐答案
在 中添加 jsp-property-group
Add a include-prelude in the jsp-property-group in web.xml for the jsps which you want the content to be added.
<jsp-config>
<jsp-property-group>
<url-pattern>/included/a.jsp</url-pattern>
<url-pattern>/included/b.jsp</url-pattern>
<url-pattern>/included/*.jsp</url-pattern>
<include-prelude>
/WEB-INF/somecss.css
</include-prelude>
<include-coda>
</include-coda>
</jsp-property-group>
这篇关于如何在多个jsps中包含css?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文