css text settings

Commonly used css styles for application text:

  • color Set the color of the text, such as: color:red;

  • font-size Set the size of the text, such as: font-size:12px;

  • font-family Set the font of the text, such as: font-family:'Microsoft Yahei';

  • font-style Set whether the font is italic, such as: font-style:'normal'; set not to be inclined, font-style:'italic'; set the text to be italic

  • font-weight set whether the text is bold, such as: font-weight:bold; set bold font-weight:normal set no bold

  • The font sets several properties of the text at the same time. There is a compatibility problem in the order of writing. It is recommended to write in the following order: font: whether to bold font size/line height font; for example: font:normal 12px/36px 'Microsoft Yahei';

  • line-height sets the line height of the text, such as: line-height: 24px;

  • text-decoration Set the underline of the text, such as: text-decoration:none; remove the text underline

  • text-indent Set the indent of the first line of text, such as: text-indent: 24px; Set the indent of the first line of text to 24px

  • text-align sets the horizontal alignment of the text, such as text-align:center sets the text horizontally centered

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324725693&siteId=291194637
Recommended