What are the font attributes in css

王林
Release: 2020-11-30 17:00:14
Original
5577 people have browsed it

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.

What are the font attributes in css

css font attributes:

(Learning video sharing: css video tutorial)

font-family Set the font family.

h1 {font-family: Georgia;}
Copy after login

font-size Set the font size.

h1 {font-size:60px;}
h2 {font-size:40px;}
p {font-size:14px;}
Copy after login

font-style Set the font style.​

p.normal {font-style:normal;}
p.italic {font-style:italic;}
p.oblique {font-style:oblique;}
Copy after login

font-variant Display text in small caps font or normal font.

p {font-variant:small-caps;}
Copy after login

font-weight Set the thickness of the font.​

p.normal {font-weight:normal;}
p.thick {font-weight:bold;}
p.thicker {font-weight:900;}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template