使用 CSS 设置字体的简写属性


font 属性用作简写来指定其他字体属性(例如字体系列、尺寸、样式等)的数量。

示例

可尝试运行以下代码,了解如何使用 font 属性

<html>
   <head>
   </head>
   <body>
      <p style = "font:italic small-caps bold 13px georgia;">
         Applying all the properties on the text at once.
      </p>
   </body>
</html>

更新于:2020 年 1 月 30 日

173 次浏览

开启您的职业生涯

完成课程获得认证

立即开始
广告
© . All rights reserved.