字体图标的案例

<!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>

 

posted @ 2016-10-06 22:55  萧诺  阅读(343)  评论(0编辑  收藏  举报