【发布时间】:2012-08-09 09:43:39
【问题描述】:
我已经使用http://www.fontsquirrel.com/fontface/generator 套件生成器和 css 代码正确配置了 CSS 文件,并将字体文件上传到了正确的目录中。
第一次输入刷新后字体在我的网站上工作得非常好,即使在页面之间切换也是如此火狐和铬。
我的 CSS 文件顶部的 css 代码:
@charset "utf-8";
body { margin:0; padding:0; width:100%; background:url(images/bg.png) repeat; }
html { padding:0; margin:0; }
a { text-decoration:none; border: none; outline:none; }
a:hover { text-decoration:underline; }
a img {border: none; }
@font-face{ font-family: 'handfont-webfont'; src: url('text/handfont-webfont.eot'); src: url('text/handfont-webfont.eot?#iefix') format('embedded-opentype'), url('text/handfont-webfont.woff') format('woff'), url('text/handfont-webfont.ttf') format('truetype'), url('text/handfont-webfont.svg#webfont') format('svg'); }
这是用于我页面中段落的字体代码:
.body p { font-family:handfont-webfont; font-size: 12px; padding:5px 5px; margin:0; }
我试图寻找答案但找不到答案,非常感谢任何帮助。
【问题讨论】:
标签: html css fonts refresh font-face