无法为JSF页面使用.css文件加载资源(图标) [英] unable to load resource (icons) using .css file for JSF page

查看:83
本文介绍了无法为JSF页面使用.css文件加载资源(图标)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的icon.css文件.

 @font-face {
font-family: 'icomoon';
src:url("#resource{['css/fonts/icomoon.eot']}");
src:url("#resource{['css/fonts/icomoon.eot?#iefix']}") format('embedded-opentype'),
    url("#resource{['css/fonts/icomoon.woff']}") format('woff'),
    url("#resource{['css/fonts/icomoon.ttf']}") format('truetype'),
    url("#resource{['css/fonts/icomoon.svg#icomoon']}") format('svg');
font-weight: normal;
font-style: normal;

}

我使用了资源处理程序,而我需要使用资源加载器来调用.eot.woff文件.因为我的图标没有显示在我的jsf页面上. 我已经用谷歌搜索了差不多,但是找不到解决方案. 如果有人可以帮助我,我将不胜感激.

I have used resource handler instead I need to use resource loader to call .eot , .woff files. because my icons are not displaying on my jsf page. I have googled about the same but couldn't find the solution. I would be thankful if anyone can help me.

推荐答案

@font-face {
font-family: 'icomoon';
src: url("#{resource['Styles:fonts/icomoon.eot?gmqg4d']}");
src: url("#{resource['Styles:fonts/icomoon.eot']}&gmqg4d#iefix") format('embedded-opentype'),
url("#{resource['Styles:fonts/icomoon.ttf']}") format('truetype'),
url("#{resource['Styles:fonts/icomoon.woff']}") format('woff'),
url("#{resource['Styles:fonts/icomoon.svg']}&gmqg4d#icomoon") format('svg'); 
font-weight: normal;
font-style: normal;
}

这里是代码. 看,如果它不起作用,请根据需要多次重启服务器,直到出现图标为止

Here the code. Look, if it does not work, restart the server as many times as necessary until the icons appear

这篇关于无法为JSF页面使用.css文件加载资源(图标)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆