zoukankan      html  css  js  c++  java
  • CSS3 @font-face属性

    属性定义及使用说明

    @font-face规则,网页设计师再也不必使用的"web-safe"的字体之一。

    字体的名称,font - face规则:

    • font-family: myFirstFont;

    字体文件包含在您的服务器上的某个地方,参考CSS:

    • src: url('Sansation_Light.ttf')

    如果字体文件是在不同的位置,请使用完整的URL:

    • src: url('http://www.w3cschool.css/css3/Sansation_Light.ttf')
    @font-face
    {
    font-family: myFirstFont;
    src: url('Sansation_Bold.ttf'),
         url('Sansation_Bold.eot'); /* IE9+ */
    font-weight:bold;
    }



    CSS3 字体描述符

    下面的表格列出了能够在 @font-face 规则中定义的所有字体描述符:

    描述符描述
    font-family name 必需。规定字体的名称。
    src URL 必需。定义字体文件的 URL。
    font-stretch
    • normal
    • condensed
    • ultra-condensed
    • extra-condensed
    • semi-condensed
    • expanded
    • semi-expanded
    • extra-expanded
    • ultra-expanded
    可选。定义如何拉伸字体。默认是 "normal"。
    font-style
    • ormal
    • italic
    • oblique
    可选。定义字体的样式。默认是 "normal"。
    font-weight
    • normal
    • bold
    • 100
    • 200
    • 300
    • 400
    • 500
    • 600
    • 700
    • 800
    • 900
    可选。定义字体的粗细。默认是 "normal"。
    unicode-range unicode-range 可选。定义字体支持的 UNICODE 字符范围。默认是 "U+0-10FFFF"。
  • 相关阅读:
    用Python获取Linux资源信息的三种方法
    对python中元类的理解
    一道有趣的和编程无关的编程题思考
    Python编程进阶
    函数计算的 Python手册小问题
    Linux 命令
    pyechart
    KV数据库Redis
    微博API 学习记录
    非阻塞式的 requests.post 学习
  • 原文地址:https://www.cnblogs.com/izengbin/p/7118007.html
Copyright © 2011-2022 走看看