前端 - pc端引入的特殊字体只引入ttf文件可以吗?
怪我咯
怪我咯 2017-04-17 11:52:07
0
2
1285

我的项目中页面用到了方正兰亭 粗体和细黑体,设计给我提供的字体文件只有ttf,如果只引入这中格式会不会出现什么问题呢?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(2)
迷茫

First obtain the three file formats of the font to be used, .EOT, .TTF or .OTF, .SVG, to ensure that the font can be displayed normally in mainstream browsers.

.EOT, for Internet Explorer 4.0+
.TTF or .OTF, for Firefox 3.5, Safari, Opera
.SVG, for Chrome, IPhone

Statement

@font-face {
 font-family: 'newFont';
 src: url('fontName.eot');
 src: local('fontName Regular'),
        local('fontName'),
        url('fontName.woff') format('woff'),
        url('fontName.ttf') format('truetype'),
        url('fontName.svg#fontName') format('svg');
}  

Call

p{font-family: newFont}
小葫芦

Using only ttf may not support some browsers

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template