字体属性综合写法(font)

    font是字体属性中可以综合定义以上五种属性的快捷方法,它可以用一行来定义font属性,书写顺序分别是:font-style font-variant font-weight font-size font-family。例子:


  .ziti {font:italic normal bold 18px arial;}



    如果哪项属性是默认值,可以把他省略不写,系统会自动解析其为默认值。

font的取值有点复杂,取值主要分为两部分,现在举几个[ [ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family> ]取值的例子.

p
{
	font:italic small-caps bold 12px/1.2em Arial;
}

  

相关文章:

  • 2022-12-23
  • 2021-12-28
  • 2021-08-19
  • 2021-06-24
  • 2021-12-10
  • 2022-01-14
  • 2022-01-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2021-12-31
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案