【发布时间】:2014-01-14 21:32:28
【问题描述】:
我应该能够在 css 中使用 EL 来访问 jsf 2 应用程序的资源文件夹中的 img 吗?它似乎不起作用。在我的css中,我有以下内容:
.sectionDivider {
background-image: "#{resource['default:img/dashes.png']}";
background-position:center;
width:100%;
background-repeat: repeat-x;
height: 1px;
overflow: hidden;
}
当我通过浏览器访问该页面时,没有显示背景图像。当我使用浏览器开发工具查看 CSS 时,CSS 如下所示(缺少背景图像):
.sectionDivider {
WIDTH: 100%; BACKGROUND-REPEAT: repeat-x; BACKGROUND-POSITION: center 50%; HEIGHT: 1px; OVERFLOW: hidden
}
【问题讨论】: