谁能帮我解决这个问题: 我有这个字体:
@font-face {
font-family: 'Museo500Regular';
src: url('MuseoSans_500-webfont.eot');
src: local('?'),
url('MuseoSans_500-webfont.woff') format('woff'),
url('MuseoSans_500-webfont.ttf') format('truetype'),
url('MuseoSans_500-webfont.svg#webfontr3rD8cn7') format('svg');
font-weight: normal;
font-style: normal;
}
这在 webkit 浏览器上不起作用,我不明白为什么...... O 其他浏览器,如 firefox 或 IE,它工作得很好,但仅在 webkit 上呈现效果不佳。
这里有一个带有下拉菜单的测试页面示例,只需查看其他浏览器和谷歌浏览器上的字体即可。
谢谢。
最佳答案
我已经下载了你的 MuseoSans_500-webfont.ttf.. 看起来它不是一个有效的字体......或者没有正确上传到服务器......再次上传......
或者转到以下链接并生成您的字体样式 css... http://www.fontsquirrel.com/fontface/generator
@font-face {
font-family: 'Museo500Regular';
src: url('museosans_500-webfont-webfont.eot');
src: url('museosans_500-webfont-webfont.eot?#iefix') format('embedded-opentype'),
url('museosans_500-webfont-webfont.woff') format('woff'),
url('museosans_500-webfont-webfont.ttf') format('truetype'),
url('museosans_500-webfont-webfont.svg#_.regular') format('svg');
font-weight: normal;
font-style: normal;
}
关于html - 自定义字体不适用于 webkit 浏览器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13067061/