2019.11.12-css styles

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

  • 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';

  • High line-height line of text is provided, such as: line-height: 24px;

  • 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

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

 

css color representation

css color values ​​are represented by three main methods:

1, the color name indicates, such as: red red, gold and gold

2, rgb said, such as: rgb (255,0,0) for red

3,16 hexadecimal value represents, for example: # ff0000 for red, which can be abbreviated as # f00

Guess you like

Origin www.cnblogs.com/lishuide/p/11846210.html