zoukankan      html  css  js  c++  java
  • css渲染(一) 字体

    一、字体属性

    1.默认字体系列

      chrome/opera:"宋体"

      firefox:"微软雅黑"

      safari/IE:Times,"宋体"

    2.字体属性

    字体类型

    font-family  初始化时定义字体类型,如宋体

    
    
    font-family: arial,“宋体”,“微软雅黑”;   //【注意】若浏览器识别第一个字体,则以第一个字体显示;如果不识别,则尝试下一个。 

    字体大小

    font-size

      应用于: 所有元素

      继承性: 有

      百分数: 相对于父元素的字体大小font-size

    默认字体大小

      chrome/firefox/opera/IE/safari:16px

    最小字体大小

      chrome:12px

      opera:9px

      safari/IE/firefox:无

    字体加粗

    【1】常用值

    font-weight: normal(正常,默认)
    font-weight: bold(加粗)

    【2】所有值

      normal(正常)/bold(粗体)/bolder(更粗)/lighter(更细)

      100/200/300/400/500/600/700/800/900 (100为最细,900为最粗)

    字体风格

    font-style: normal(默认)
    font-style: italic(斜体)
    font-style: oblique(倾斜)

    行高

    line-height: normal(默认)
    line-height: 具体值

     颜色 

    color:red
  • 相关阅读:
    451. Sort Characters By Frequency
    424. Longest Repeating Character Replacement
    68. Text Justification
    44. Wildcard Matching
    160. Intersection of Two Linked Lists
    24. Swap Nodes in Pairs
    93. 递归实现组合型枚举
    98. 分形之城
    97. 约数之和
    96. 奇怪的汉诺塔
  • 原文地址:https://www.cnblogs.com/chaixiaozhi/p/8491359.html
Copyright © 2011-2022 走看看