码迷,mamicode.com
首页 > Web开发 > 详细

DIV+CSS外部字体引用

时间:2014-07-24 12:17:55      阅读:328      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   使用   strong   2014   re   

注意:

  由于各个浏览器兼容问题大家还是少用这个,下面是具体的使用方法和效果截图:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title></title>
    <style type="text/css">
        *{padding:0px; margin:0px; font-size:50px;}
        @font-face { font-family: test; src: url(‘alpha_echo.ttf‘); } 
        @font-face { font-family: test1; src: url(‘Almendra-Bold.otf‘); } 
        @font-face { font-family: test2; src: url(‘MFYueHei_Noncommercial-Regular.otf‘); } 
        @font-face { font-family: test3; src: url(‘Ruthie-Regular-OTF.otf‘); } 
        p{font-family: "test";}
        b{font-family: "test1";}
        span{font-family: "test2";}
        strong{font-family: "test3";}
    </style>
</head>
<body>

    <p style="font-size:40px">asdfasdfasdf白增飞</p>
    <b>adfasdfasdf</b><br />
    <span>白增飞 demo Font test</span>
    <br />
    <strong>baizengfei 白增飞</strong>
</body>
</html>

效果如下:

bubuko.com,布布扣

DIV+CSS外部字体引用,布布扣,bubuko.com

DIV+CSS外部字体引用

标签:style   blog   http   color   使用   strong   2014   re   

原文地址:http://www.cnblogs.com/flay/p/3865204.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!