The font attributes in css are: 1. Font style attribute font-family; 2. Font size attribute font-size; 3. Font style attribute font-style; 4. Font weight attribute font-weight; 5 , font deformation attribute font-vatiant.
css font attributes:
(Learning video sharing: css video tutorial)
font-family Set the font family.
h1 {font-family: Georgia;}
font-size Set the font size.
h1 {font-size:60px;} h2 {font-size:40px;} p {font-size:14px;}
font-style Set the font style.
p.normal {font-style:normal;} p.italic {font-style:italic;} p.oblique {font-style:oblique;}
font-variant Display text in small caps font or normal font.
p {font-variant:small-caps;}
font-weight Set the thickness of the font.
p.normal {font-weight:normal;} p.thick {font-weight:bold;} p.thicker {font-weight:900;}
Other properties include:
font-size-adjust When the preferred font is unavailable, intelligent scaling of the replacement font is performed. (CSS2.1 has removed this attribute.)
font-stretch Stretch the font horizontally. (CSS2.1 has deleted this attribute.)
Related recommendations: CSS tutorial
The above is the detailed content of What are the font attributes in css. For more information, please follow other related articles on the PHP Chinese website!