1

How can enterCSS font stylesprises ensure blackmail virus protection and prevent information disclosure

4 months ago from

1.font-size

Specifies the font size. Common units are EM and PX

2.font-family

Specifies the font to use

The commonly used Chinese fonts are Microsoft YaHei and Song typeface, and the English font is Arial

Multiple fonts can be specified at the same time, separated by English commas. The browser will search in order. If it can't find it, it will find the next one. If it can't find it all, it will use the system default font

If the font is expressed in Chinese, it needs to be separated by double quotation marks or single quotation marks. Generally, quotation marks are not required for English fonts, but quotation marks are also required if there are special characters (such as spaces, backslashes, #, $, etc.)

  1. Common CSS font skills:

Now the font size of web pages is generally 14px+

Try to use even numeric font sizes, because there are bugs in some old browsers using odd font sizes

Try to use the system default font to ensure that users can display normally in any browser

  1. CSS Unicode font

Is to use Unicode encoding to represent fonts, in order to consider compatibility

5.font-weight

Font thickness (BOLD equals to setting the value of this attribute to 700, normal equals to setting the value of this attribute to 400 – > No unit is used, it is recommended to use numbers because the resolution will be faster)

6.fon-style

Normal (generally used to make the italics not inclined. The EM tag has the meaning of emphasizing, but the font will be inclined. You can set the font style attribute value for the EM tag to normal to cancel the effect of inclination)

Font styles can be concatenated

Attention should be paid to when writing font style: it must be written in order. There can be omitted styles, but it must be written in order

  1. Color: font color

Predefined colors such as green, red, etc

  1. Text decoration: text decoration: none, underlined (commonly used to add underline and remove underline)

  2. Line high: line spacing. Generally, the line spacing only needs to be 7 or 8 pixels larger than the font size

  3. Text align: horizontal alignment of text content

  4. Text indent: the first line of the paragraph is indented. The unit is em. 1em is a word, so the style value is 2em, indicating that the first line of the paragraph is indented by two characters