CSS教程:所有浏览器中都能正常显示的字体

zhao100861

zhao100861

2016-02-19 23:52

今天天气好晴朗处处好风光,好天气好开始,图老师又来和大家分享啦。下面给大家推荐CSS教程:所有浏览器中都能正常显示的字体,希望大家看完后也有个好心情,快快行动吧!

很佩服国外一些前端开发人员对待学问的研究精神,他们很善于总结发现。看到一篇关于安全字体List of Web Safe Fonts的文章,里面总结了所有的安全字体的样式,当然都是英文的。

所谓安全字体,就是在所有的浏览器中都能正常显示的字体,也就是所有操作系统默认都安装了的字体。

共有21种安全字体:

font-family: Arial, Helvetica, sans-serif;
font-family: 'Arial Black', Gadget, sans-serif;
font-family: 'Bookman Old Style', serif;
font-family: 'Comic Sans MS', cursive;
font-family: Courier, monospace;
font-family: 'Courier New', Courier, monospace;
font-family: Garamond, serif;
font-family: Georgia, serif;
font-family: Impact, Charcoal, sans-serif;
font-family: 'Lucida Console', Monaco, monospace;
font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;
font-family: 'MS Sans Serif', Geneva, sans-serif;
font-family: 'MS Serif', 'New York', sans-serif;
font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;
font-family: Symbol, sans-serif;
font-family: Tahoma, Geneva, sans-serif;
font-family: 'Times New Roman', Times, serif;
font-family: 'Trebuchet MS', Helvetica, sans-serif;
font-family: Verdana, Geneva, sans-serif;
font-family: Webdings, sans-serif;
font-family: Wingdings, 'Zapf Dingbats', sans-serif;  

我们用一个页面形象的展示出来:

!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
html xmlns="http://www.w3.org/1999/xhtml"
head
meta http-equiv="Content-Type" content="text/html; charset=gb2312" /
title安全字体/title
style type="text/css"
!--
* { font-size:12px}
div { padding:5px 0; border-bottom:1px solid #ccc}
P { margin:3px 0}
.font_arial {font-family: Arial, Helvetica, sans-serif}
.font_arialblack {font-family: 'Arial Black', Gadget, sans-serif;}
.font_bookman {font-family: 'Bookman Old Style', serif;}
.font_comic {font-family: 'Comic Sans MS', cursive;}
.font_courier {font-family: Courier, monospace;}
.font_couriernew {font-family: 'Courier New', Courier, monospace;}
.font_garamond {font-family: Garamond, serif;}
.font_georgia {font-family: Georgia, serif;}
.font_impact {font-family: Impact, Charcoal, sans-serif;}
.font_lucida_c {font-family: 'Lucida Console', Monaco, monospace;}
.font_lucida_s {font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif;}
.font_mssans {font-family: 'MS Sans Serif', Geneva, sans-serif;}
.font_msserif {font-family: 'MS Serif', 'New York', sans-serif;}
.font_palatino {font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif;}
.font_symbol {font-family: Symbol, sans-serif;}
.font_tahoma {font-family: Tahoma, Geneva, sans-serif;}
.font_times {font-family: 'Times New Roman', Times, serif;}
.font_trebuchet {font-family: 'Trebuchet MS', Helvetica, sans-serif;}
.font_verdana {font-family: Verdana, Geneva, sans-serif;}
.font_webdings {font-family: Webdings, sans-serif;}
.font_wingdings {font-family: Wingdings, 'Zapf Dingbats', sans-serif;}
--
/style
/head

body
div class="font_arial"
p这是字体:font-family: Arial, Helvetica, sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_arialblack"
p这是字体:font-family: 'Arial Black', Gadget, sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_bookman"
p这是字体:font-family: 'Bookman Old Style', serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_comic"
p这是字体:font-family: 'Comic Sans MS', cursive/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_courier"
p这是字体:font-family: Courier, monospace/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_couriernew"
p这是字体:font-family: 'Courier New', Courier, monospace/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_garamond"
p这是字体:font-family: Garamond, serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_georgia"
p这是字体:font-family: Georgia, serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_impact"
p这是字体:font-family: Impact, Charcoal, sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/webkaifa/)

div class="font_lucida_c"
p这是字体:font-family: 'Lucida Console', Monaco, monospace/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_lucida_s"
p这是字体:font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
/div

div class="font_mssans"
p这是字体:font-family:  'MS Sans Serif', Geneva, sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_msserif"
p这是字体:font-family: 'MS Serif', 'New York', sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_palatino"
p这是字体:font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/webkaifa/)

div class="font_symbol"
p这是字体:font-family: Symbol, sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_tahoma"
p这是字体:font-family: Tahoma, Geneva, sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_times"
p这是字体:font-family: 'Times New Roman', Times, serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div
div class="font_trebuchet"
p这是字体:font-family: 'Trebuchet MS', Helvetica, sans-seriff/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_verdana"
p这是字体:font-family: Verdana, Geneva, sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_webdings"
p这是字体:br /
  font-family: Webdings, sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div

div class="font_wingdings"
p这是字体:br /
  font-family: Wingdings, 'Zapf Dingbats', sans-serif/p
p中文和英文混排test/p
pABCDEFGHIJKLMNOPQRSTUVWXYZ/p
pabcdefghijklmnopqrstuvwxyz/p
p0123456789/p
/div
/body
/html

IE7下截图:

CSS教程:所有浏览器中都能正常显示的字体_webjx



CSS教程:所有浏览器中都能正常显示的字体_webjx

CSS教程:所有浏览器中都能正常显示的字体_webjx

CSS教程:所有浏览器中都能正常显示的字体_webjx

以前常常在烦恼中英文混排的问题,英文字体一般都是选用亚洲字体或者Verdana字体,可在和中文混排的时候都不是很理想,偶然看到一篇淘宝兄弟的blog,他建议用Tahoma字体,而且发现淘宝网很快的改用了这种字体。从我上面的截图也可以看出,Tahoma字体在12px下中英文混排是看上去最舒服的。

展开更多 50%)
分享

猜你喜欢

CSS教程:所有浏览器中都能正常显示的字体

Web开发
CSS教程:所有浏览器中都能正常显示的字体

在IE浏览器中正常显示的字体效果设置

浏览器
在IE浏览器中正常显示的字体效果设置

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

CSS教程:inline-block在各浏览器的显示

Web开发
CSS教程:inline-block在各浏览器的显示

CSS Hack兼容各浏览器是否正常

Web开发
CSS Hack兼容各浏览器是否正常

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

浏览器不能正常解析CSS代码的解决

Web开发
浏览器不能正常解析CSS代码的解决

css字体设置(不同浏览器设置效果)

Web开发
css字体设置(不同浏览器设置效果)

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

使用QQ邮箱发邮件发错人了怎么办?

使用QQ邮箱发邮件发错人了怎么办?

好友如何等级PKQQ与好友等级PK的方法

好友如何等级PKQQ与好友等级PK的方法
下拉加载更多内容 ↓