Home >Web Front-end >CSS Tutorial >What does font in css3 mean?
In CSS, font means "font" and is an abbreviated attribute used to set all font attributes; the font attribute can set the style of the font in order, and the syntax is "element {font:style variant weight size/height family;}".
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
What does font in css3 mean?
font represents the font, which is an abbreviated font attribute in CSS, used to set the element font at once Two or more aspects can set all font properties in a single declaration.
font shorthand property sets all font properties in one declaration.
Note: This property also has a sixth value: "line-height", which can set the line spacing.
This shorthand property is used to set two or more aspects of an element's font at once. Use keywords such as icon to appropriately set the font of an element to match an aspect of the user's computer environment. Note that if these keywords are not used, at least the font size and font family must be specified.
You can set the following properties in order:
The example is as follows:
<html> <head> <style type="text/css"> p.ex1 { font:italic arial,sans-serif; } p.ex2 { font:italic bold 12px/30px arial,sans-serif; } </style> </head> <body> <p class="ex1">This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.</p> <p class="ex2">This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.</p> </body> </html>
Output result:
(Learning video sharing: css video tutorial)
The above is the detailed content of What does font in css3 mean?. For more information, please follow other related articles on the PHP Chinese website!