[Front-end study notes day18] 3.2. Css text settings

3.2. Css text settings

Here Insert Picture Description

css text settings

Common applications of text css style:

  • color setting text color, such as: color: red;

  • font-size character size settings, such as: font-size: 12px;

  • font-family font character set, such as: font-family: 'Microsoft yahei';

  • Whether italic font-style settings, such as: font-style: 'normal'; setting is not inclined, font-style: 'italic'; provided text italic

  • font-weight Bold text is provided, such as: font-weight: bold; provided bold font-weight: normal setting not bold

  • High line-height line of text is provided, set the row height corresponding to the vertical pitch while adding each line of text, such as: line-height: 24px; [Image dump the chain fails, the source station may have security chain mechanism, it is recommended to save the picture down uploaded directly (img-y9ZwSLTr-1580369995021) (../ images / lineheight.jpg)]

  • font and set several attributes of the text, written in the order have compatibility problems, it is recommended to write the following order: font: italic, bold font / font line height; such as: font: normal 12px / 36px 'Microsoft elegant black';

  • text-decoration provided underline text, such as: text-decoration: none; underlined text removed

  • text-indent the first line indent text settings, such as: text-indent: 24px; 24px set the text first line indent [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-8mzCMRru-1580369995022)(../images/suojin.jpg)]

  • text-align the horizontal alignment of the text is provided as text-align: center centered horizontally disposed Text

Published 289 original articles · won praise 94 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_35456045/article/details/104115632