我正在尝试渲染 THIS在 JSP 中。我现在正处于开发的早期阶段,所以我希望样式是内联的。
我的 JSP 代码是
<%
%><%@include file="/libs/foundation/global.jsp"%><%
%><%@page session="false" %><%
%><%
<style type="text/css">
.line {
width:70%;
}
.line:after {
content:'';
position: absolute;
border-style: solid;
border-width: 15px 15px 0;
border-color: #FFFFFF transparent;
display: block;
width: 0;
z-index: 1;
top: 8px;
left: 45%;
}
.line:before {
content:'';
position: absolute;
border-style: solid;
border-width: 15px 15px 0;
border-color: #7F7F7F transparent;
display: block;
width: 0;
z-index: 1;
top: 9px;
left: 45%;
}
</style>
<%@include file="/apps//global.jsp"%>
<hr class="line">
%>
我确信 css 样式是 fince,因为它在 fiddle 中正确呈现。
有什么办法可以解决这个问题吗?任何帮助深表感谢。非常感谢。
最佳答案
为每个部分定义CSS类并将其包含在使用中
关于css - JSP 中的内联 CSS 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26394230/