Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the shortcut of font attribute in css?

Shulou Source: shulou.com Published: 2022-06-01 04:49:23 09月22日 Update

Xiaobian to share with you what is the shortcut of font attribute in css, I hope you have gained something after reading this article, let's discuss it together!

font Shortcuts to attributes

font Shortcuts are formatted as:

body { font: font-style font-variant font-weight font-size line-height font-family; }

So,

The code is as follows:

body { font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; font-variant: small-caps; font-style: italic; line-height: 150%; }

It can be written as:

body { font: italic small-caps normal 13px/150% Arial, Helvetica, sans-serif; } After reading this article, I believe you have a certain understanding of "what is the shortcut of font attribute in css". If you want to know more relevant knowledge, please pay attention to the industry information channel. Thank you for reading!

Tags: Writing attributes articles code done more format knowledge industry information information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information OPPO Reno Redmi NVidia Shulou Technology