我有以下JSP代码,它在页面上打印,如
使用者:APR / 04/2017
现在我希望它打印为
使用者:APR / 04/2017
虽然label.global.useBy的值是"使用By"由于我在CSS中定义的样式,它正在变得大写。我这样做是为了在所有CAPS中呈现月份。否则它将被打印为
使用者:2017年4月4日
您能否建议我如何保持"使用By"按原样,juts按月计算,如:
使用者:APR / 04/2017
<td class="contentArea"><bean:message key="label.global.useBy"/>: <bean:write name="details"property="expirationDate" formatKey="format.date.certificate" /></td>
相关CSS
.contentArea {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
color: #000000;
text-transform: uppercase;
}
答案 0 :(得分:1)
谢谢@Rahul Kapuriya, 我在TD中使用SPAN标签,
<td class="contentArea"><bean:message key="label.global.useBy"/>: <span style="font-weight:bold; text-transform: uppercase;"><bean:write name="details"
property="expirationDate" formatKey="format.date.certificate" /><span></td>
谢谢!
答案 1 :(得分:1)
&#34;欢迎你#34; -Rahul Kapuriya
您可以使用 <strong>
标记,这样您就不必添加样式font-weight:bold
像这样:
<td class="contentArea"><bean:message key="label.global.useBy"/>: <strong style="text-transform: uppercase;"><bean:write name="details"
property="expirationDate" formatKey="format.date.certificate" /><strong></td>