更新时间:2023-02-22 09:34:45
在某些情况下,你需要添加不同浏览器识别的格式。
在css文件中使用以下CSS加载字体,
In some cases, you need to add the format, that is recognized by the different browsers.
Use following CSS in you css file to load the font,
@font-face {
font-family: 'MyWebFont';
src: url('webfont.eot'); /* IE9 Compat Modes */
src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('webfont.woff') format('woff'), /* Modern Browsers */
url('webfont.ttf') format('truetype'), /* Safari, Android, iOS */
url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}
/* Use it */
body {
font-family: 'MyFontFamily', Fallback, sans-serif;
}
阅读: http://www.iandevlin.com/blog/2009/12/webdev/adventures-with-font-面对 [ ^ ]
-KR
Read this : http://www.iandevlin.com/blog/2009/12/webdev/adventures-with-font-face[^]
-KR