我正在使用网络字体代替图像文件的图标。我得到了设计师的原始字体,然后我通过Font Squirrel's @font-face generator完成了全套设计。我打开了他们随输出字体一起提供的测试*.html
文件,并且它在我查看的每个浏览器(包括IE7)中都能持续工作。IE8中图标的网络字体
我在我的服务器上安装了字体,并且它再次在我测试的每个浏览器(包括IE9)(除IE7以外)中一直运行。奇怪的是,它在IE7中大约有一半时间运行。所以如果我只是反复刷新页面,那么它将随机工作大约一半的页面加载,而不是另一半工作。
我已通过'开发人员工具'窗口多次清除缓存。
这里是我使用包括字体的CSS:
@font-face {
font-family: 'iconRegular';
src: url('/static/fonts/icon-webfont.eot');
src: url('/static/fonts/icon-webfont.eot?#iefix') format('embedded-opentype'),
url('/static/fonts/icon-webfont.woff') format('woff'),
url('/static/fonts/icon-webfont.ttf') format('truetype'),
url('/static/fonts/icon-webfont.svg#iconRegular') format('svg');
font-weight: normal;
font-style: normal;
}
.icon,
.ui-widget-content .icon {
font-family: 'iconRegular';
font-weight: normal;
font-style: normal;
font-variant: normal;
}
我在一个庞大的应用程序(通过〜加载require.js
20个*.js
文件)在使用本;这可能与我的应用程序的大小有关吗?