码迷,mamicode.com
首页 > 其他好文 > 详细

字体图标的案例

时间:2016-10-07 01:31:42      阅读:134      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS3 Web字体</title>
    <style>
        body {
            text-align: center;
        }

        /*声明字体*/
        @font-face {
            /*第三方字体名称*/
            font-family: ‘testfont01‘;
            /*引入第三方字体的文件*/
            src: url(‘../fonts/LiDeBiao-Xing3/LiDeBiao-Xing3.eot‘) format(‘embedded-opentype‘),
            url(‘../fonts/LiDeBiao-Xing3/LiDeBiao-Xing3.woff‘) format(‘woff‘),
            url(‘../fonts/LiDeBiao-Xing3/LiDeBiao-Xing3.ttf‘) format(‘truetype‘),
            url(‘../fonts/LiDeBiao-Xing3/LiDeBiao-Xing3.svg‘) format(‘svg‘);
            font-weight: normal;
            font-style: normal;
        }

        p.demo {
            font-family: testfont01;
            font-size: 24px;
        }
    </style>
</head>
<body>
    <p class="demo">
        英雄不问出处,流氓不看岁数这个字行不行
    </p>
    <p class="demo">非英雄,非流氓</p>
</body>
</html>

 

字体图标的案例

标签:

原文地址:http://www.cnblogs.com/lsy0403/p/5935159.html

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