html有趣字体,html – CSS多字体系列?

这意味着如果客户端的浏览器没有可用的先前字体,则字体将回退到列出的下一个字体.

通过列出多种字体,即使您列出的第一个字体在浏览器中不可用,您也可以确保客户端看到您要显示的字体.

在你的例子中:

body {

background-color: silver;

color: white;

padding: 20px;

font-family: Arial, Verdana, sans-serif;

}

Arial将退回到Verdana,这将回归无衬线

最佳实践:

Start with the font you want, and always end with a generic family, to let the browser pick a similar font in the generic family, if no other fonts are available.

The font-family property specifies a list of fonts, from highest priority to lowest. Font selection does not simply stop at the first font named in the list that is on the user’s system. Rather, font selection is done one character at a time, so that if an available font does not have a glyph that can display a character needed, the later available fonts are tried. However, this doesn’t work in Internet Explorer 6 or earlier.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值