网站前端嵌入特殊字体

一、web中常用的20种字体
https://www.cnblogs.com/duanhuajian/archive/2013/01/31/2887117.html

二、网页中嵌入特殊字体(@font-face) https://www.w3cways.com/1738.html
转换字体的网站http://www.fontsquirrel.com/tools/webfont-generator

font-face

自动生成所需eot,svg,ttf,woff,woff2 5种文件,并且还有个CSS文件,直接包含调用以上5种文件

@font-face {
    font-family: 'open_sansregular';
    src: url('opensans-regular-webfont.eot');
    src: url('opensans-regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('opensans-regular-webfont.woff2') format('woff2'),
         url('opensans-regular-webfont.woff') format('woff'),
         url('opensans-regular-webfont.ttf') format('truetype'),
         url('opensans-regular-webfont.svg#open_sansregular') format('svg');
    font-weight: normal;
    font-style: normal;
 
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容