CSS3新增的服务器字体

1、使用服务器字体

     使用服务器字体非常简单,只要使用@font-face定义服务器字体即可。格式如下:

     @font-face{

               font-family:name;

               src:url(url) format(font-format);   

      }

      到目前为止,服务器字体还只支持TrueType格式和OpenType格式。

2、定义粗体字和斜体字

     @font-face{

               font-family:CrazyIt;

               src:url("Delicious-Bold.otf") format("OpenType");   

               font-weight:bold;      

      }

3、优先使用客户端字体

     @font-face{

               font-family:CrazyIt;

               src:local("Goudy Stout"), url("Blazed.ttf") format("TrueType");   

      }

posted @ 2015-01-05 23:19  玉麒麟  阅读(1470)  评论(0编辑  收藏  举报