CSS---------------Text Types

Source: Internet
Author: User

Change text through font, mainly from the following aspects

    • Font bold, font style: Italic and Font variants: small caps
    • Size of font
    • Row height
    • Font

Examples such as the following

P{font:italic 75%/125% "Comic Sans MS", cursive;}

This rule defines several attributes of the font so that the entire paragraph text becomes italic.

The font size is set to 3/4 of the font size of the parent element for each paragraph, and the row height is set to 125% (slightly larger than the regular interval).

The text font is set to Comic Sans MS, and the default font is used if the font is not supported by the browser: cursive.

This rule also removes the effects of bold and small-caps (set their values to normal)

Fonts: Precautions font-family

1 because the user can not be expected to access the font defined in the style table. So it's a good idea to have an alternate font list after the property when setting the font.

2 at the end of this font list, add one of the system fonts. such as: Serif,sans-serif,cursive,fantasy or monospace

If fonts do not support the font characteristics set in the style table, the browser uses a different font.

Font Size: font-size

Row Height Line-height

The row height is used to specify the distance between rows and rows (line spacing).

Decorative Text-decoration

Specify text style underline double underline line-through underline none cancel

Font-style specifying text styles Normal, italic, oblique, inherit

FONT-WEIGHT Specifies whether the text is bold

Default value: Normal

Applies to: all elements

Inheritance: Support

Desirable value: normal | Bold | Bolder | lighter| |200 |300|400|500|600|700|800|900|inherit

  

     

CSS---------------Text Types

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.