设置页面字体
网页中的字体是通过css设定,如:font-family:'Microsoft Yahei',"simsun"; 意思是先找微软雅黑,如果没有就使用宋体字,当然,如果你的客户是windows中国用户宋体是默认字体,此时font- family:'Microsoft Yahei',"simsun";和font-family:'Microsoft Yahei';等价的。找不到微软雅黑字体就会使用默认的宋体。
/*网页字体参考
font-family:"simsun";
font-family:Tahoma,Arial,Helvetica,STHeiti;
font-family:Georgia, "Times New Roman","simsun";
font-family:'Microsoft YaHei UI','Microsoft YaHei',DengXian,SimSun,'Segoe UI',Tahoma,Helvetica,sans-serif;
font-family:'Hiragino Sans GB','Microsoft Yahei',SimSun,Tahoma,Arial,Helvetica,STHeiti;
font-family:"ff-tisa-web-pro-1","ff-tisa-web-pro-2","Lucida Grande","Helvetica Neue",Helvetica,Arial,"Hiragino Sans GB","Hiragino Sans GB W3","Microsoft YaHei UI","Microsoft YaHei","WenQuanYi Micro Hei",sans-serif
*/
我们通常都会这样来定义字体,这也是用的最多的定义方式。这些网页字体依次是 “苹果丽黑字体”(这个是苹果系列设备上用),微软雅黑、文泉驿(细)微米黑字体,宋体,Tahoma,Arial,Helvetica,苹果黑体字体(这个是苹果系列设备上用)
.selector{ font-family:"Microsoft YaHei",微软雅黑,"MicrosoftJhengHei",华文细黑,STHeiti,MingLiu }
说明:
加上中文名“微软雅黑”是为了兼容opera。
另外正文字号一般为12 字号我们通常都设置为偶数