Home  >  Article  >  Web Front-end  >  How to set font style in css

How to set font style in css

coldplay.xixi
coldplay.xixiOriginal
2021-04-28 16:42:0219195browse

How to set font style in css: 1. Use [font-family] to set the font type; 2. Use [font-size] to set the font size; 3. Use [font-variant] to set whether letters are converted to uppercase .

How to set font style in css

The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.

How to set font style in css:

font-family: Font type (affiliation, Song Dynasty, New Roman,...)

This font type setting depends on the font library installed in the current operating system.

If the set font type can be found in the system, the font will be enabled.

If the font type is If the set font type cannot be found in the system, the default font will be used

If the font type name contains spaces, the font name needs to be enclosed in quotation marks, and Chinese characters are generally enclosed in quotation marks

font-size: Font size

Units that can be set: by percentage, by predefined keywords (smaller, larger,...), centimeters, millimeters, inches, em

font-style: Font style, generally only distinguishes between normal or slanted

font-variant: Set whether letters are converted to uppercase

Related tutorial recommendations: CSS video tutorial

The above is the detailed content of How to set font style in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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