body {
background-color: silver;
color: white;
padding: 20px;
font-family: Arial,Verdana,sans-serif;
}
当有多个csv字体系列时,它是什么意思,如上所述?
body {
background-color: silver;
color: white;
padding: 20px;
font-family: Arial,Verdana,sans-serif;
}
当有多个csv字体系列时,它是什么意思,如上所述?
通过列出多种字体,即使您列出的第一个字体在浏览器中不可用,您也可以确保客户端看到您要显示的字体.
在你的例子中:
body {
background-color: silver;
color: white;
padding: 20px;
font-family: Arial,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.
作为一个有趣的花絮字体系列在character by character basis上可能很重要:
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.