很佩服国外一些前端开发人员对待学问的研究精神,他们很善于总结发现。看到一篇关于安全字体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 {fon |