# 网页字体的设置

2017年9月29日 / 223次阅读
CSS

font-family:微软雅黑;

font-family: Tahoma, Helvetica, Arial, Microsoft Yahei,微软雅黑, STXihei, 华文细黑, sans-serif;

<style>
@font-face
{
font-family: myFont;
src: url(sansation_light.woff);
}

div
{
font-family:myFont;
}
</style>

### 留言区

《网页字体的设置》有3条留言

• 麦新杰

font-family有个生效顺序，优先使用最前面的那个字体，如果电脑上没有，就往后找，直到找到，或者都找不到，就使用浏览器默认的字体。 []

• 麦新杰

What is WebFonts? WebFonts is a technology that enables people to use fonts on demand over the Web without requiring installation in the operating system. W3C has experience in downloadable fonts through HTML, CSS2, and SVG. Until recently, downloadable fonts have not been common on the Web due to the lack of an interoperable font format. The WebFonts effort plans to address that through the creation of an industry-supported, open font format for the Web (called "WOFF"). []

• 麦新杰

应该可以通过浏览器来设置其支持的默认字体。 []

Ctrl+D 收藏本页