其他分享
首页 > 其他分享> > web嵌入特殊字体

web嵌入特殊字体

作者:互联网

目录结构

 

 代码

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        @font-face {
            font-family: "AlibabaPuHuiTiR";
            src: url("./font/Alibaba-PuHuiTi-Regular.otf") format("truetype");
        }

        @font-face {
            font-family: "PingFangSC-Regular";
            src: url("./PingFang Regular.otf") format("truetype");
        }

        @font-face {
            font-family: "PingFang SC";
            src: url("./font/PingFang Medium.otf") format("truetype");
        }
    </style>
</head>

<body>
    <p style="font-family: 'AlibabaPuHuiTiR'">阿里巴巴普惠字体Regular测试</p>
    <p style="font-family: 'PingFangSC-Regular'">平方字体Regular测试</p>
    <p style="font-family: 'PingFang SC'">平方字体测试</p>
</body>

</html>

 

标签:web,嵌入,family,format,otf,PingFang,Regular,字体,font
来源: https://www.cnblogs.com/lv77/p/15758892.html