web字体:解决用户电脑上没有安装字体类型的方法
当用户电脑上没有该字体的时候,强制让用户下载该字体。
使用@font-face
<!-- 制作一个新字体, -->
@font-face{
font-family:"good naight";
src:url("../font/wananti.ttf");<!-- 字体文件 -->
}
<p>
font-family:"good naight";
</p>
icon-font(阿里巴巴图标库)
web字体:解决用户电脑上没有安装字体类型的方法
当用户电脑上没有该字体的时候,强制让用户下载该字体。
使用@font-face
<!-- 制作一个新字体, -->
@font-face{
font-family:"good naight";
src:url("../font/wananti.ttf");<!-- 字体文件 -->
}
<p>
font-family:"good naight";
</p>
icon-font(阿里巴巴图标库)