Kar*_*ine 4 html css internet-explorer font-face
Internet Explorer 9,Firefox,Opera,Chrome和Safari支持@ font-face规则.
但是,Internet Explorer 9仅支持.eot类型字体,而Firefox,Chrome,Safari和Opera支持.ttf和.otf类型字体.
注意:Internet Explorer 8及更早版本不支持@ font-face规则.
本文来自这里.所以为了让IE9的@ font-face工作,我应该只指定EOT字体文件:
@font-face
{
font-family: myFirstFont;
src: url('Sansation_Light.ttf'),
url('Sansation_Light.eot'); /* IE9 */
}
Run Code Online (Sandbox Code Playgroud)
特别是我使用Myriad Pro,我有OTF字体.我如何将它们转换为EOT类型?
关于IE7和IE8应该使用什么技巧/黑客来获得所需的结果?
我认为这几乎是完全跨浏览器
@font-face {
font-family: 'Name';
src: url('location.eot');
src: url('location.eot#iefix') format('embedded-opentype'),
url('location.woff') format('woff'),
url('location.ttf') format('truetype'),
url('location.svg#Name') format('svg');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)
位置是服务器上的路径,Name是字体的名称
| 归档时间: |
|
| 查看次数: |
25776 次 |
| 最近记录: |