css - JSP 中的内联 CSS 样式

标签 css jsp inline-styles

我正在尝试渲染 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/

相关文章:

html - "stroke"css 属性在我的 svg 中不起作用

javascript - 为什么这些列表项的位置不正确?

reactjs - 为什么内联样式 style={{maxHeight :'443 px' , maxWidth : '443 px' }} is not working in component

python - HTML 电子邮件将外部样式表转换为内联样式

eclipse - java.lang.ClassNotFoundException : javax. servlet.jsp.jSTL.core.LoopTag 错误

javascript - 如果无法访问原始代码,是否有 html 或 js 代码为 GoDaddy 模板发送按钮提供视觉焦点

php - Symfony2 Assets 包问题

html - IE 8鼠标悬停弹出位置与CSS

jsp - IntelliJ IDEA,如何更新本地服务器(Tomcat)上的资源?

java - 两个 JSP 分隔符之间的差异