【发布时间】:2015-06-29 15:56:02
【问题描述】:
我必须为我的网页添加背景图片,所以我在下面的代码 css 中添加了正文
body {
font-family: Verdana, Geneva, sans-serif;
font-weight: 400;
color: #666;
font-size: 12px !important;
line-height: 20px;
background-image: url(../resources/img/background_img.jpg);
}
但我必须将背景图像添加为
url(${context}/resources/img/background_img.jpg);
,其中上下文将从 jsp 传递(而不是绝对路径)。 put conext param 不起作用,有没有其他方法或者我做错了。需要帮助
【问题讨论】:
-
你可以设置使用javascript或jquery