zoukankan      html  css  js  c++  java
  • DIV+CSS外部字体引用

    注意:

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

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

    效果如下:

  • 相关阅读:
    poj 2516 Minimum Cost (最小费用流 )
    new start
    关于c语言中的声明和定义
    多态性与虚函数之对象切片
    C专家编程之typedef
    QGroupBox设置边框
    多态性与虚函数之继承中的virtual 晚捆绑
    使用Map
    遍历控件
    C专家编程之枚举
  • 原文地址:https://www.cnblogs.com/flay/p/3865204.html
Copyright © 2011-2022 走看看