Home  >  Article  >  Web Front-end  >  Teach you how to use CSS to control the display style of web fonts_Experience exchange

Teach you how to use CSS to control the display style of web fonts_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:08:461733browse

HTML has only three settings for content tags: , while CSS has three settings for content Extended specifications allow us to have more detailed settings for fonts. For font settings: font-family: font name 1, font name 3, font name 3, etc. Displays the priority of the font. If the font is installed on the computer, it will be displayed in that font. If the font you set is not installed on the client's computer, the browser's default font will be displayed: font-size:18pt|120%|xx-small|s-small|small|medium| large|x-large|xx-large

There are strictly two ways to define font size:

1. Absolute
Such as: pt;in These sizes are fixed , will not change due to the resolution..

2. Relative
For example: px; em; % These will change with the resolution and the current font size...

font -style:normal|italic|oblique
font-weight:normal|bold|lighter|bolder|100-900
font-variant:normal|small-caps
Convert English lowercase to smaller font to uppercase

Regarding the application of the above, you can use any method of [CSS nesting].
For example:

The following is a quote Fragment:






Dhtml&Asp
</html>


The font displayed in this way will be 20pt size, purple, and English lowercase will be converted into smaller uppercase. Or you can set it like this:

The following is a quotation fragment:




<body> <BR><span style="font-size:20pt;font-color:purple;font-variant:small-caps">Dhtml&Asp</span> <BR></body> <BR></html >
The font displayed like this is also 20pt in size, purple, and English lowercase is converted into smaller uppercase.
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