Css字型圖示引入方式

北秋go發表於2020-11-07
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        @font-face{
            font-family: 'iconfont';
            src: url('iconfont/iconfont.eot');
            src: url('iconfont/iconfont.eot?#iefix') format('embedded-opentype'),
            url('iconfont/iconfont.woff') format('woff'),
            url('iconfont/iconfont.ttf') format('truetype'),
            url('iconfont/iconfont.svg#iconfont') format('svg');
        }
        .iconfont{
            font-family: "iconfont";
            font-size:16px;
            font-style: normal;
        }
    </style>
</head>
<body>
    <i class="iconfont">&#xe602;</i>
</body>
</html>

相關文章