Article Directory
3.2. Css text settings
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;
-
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
-
text-align the horizontal alignment of the text is provided as text-align: center centered horizontally disposed Text