CSS style Beginner

Source: Internet
Author: User

CSS Styles

CSS usage: 3 kinds of one: direct style sheet such as <p style= "color:red;" > This is a paragraph </p> two: internal style sheet such as: <style>p{color:red;} </style> Three: External style sheet such as: <link rel= "stylesheet" href= "The path name of the external CSS style" type= "Text/css"/>

Style sheet notation:

1. Paragraphs and other tags directly in <style>p{color:red;} Used in </style>

2.ID selector: You can apply a style to the specified ID, such as <style> #p {color:red;} </style> id= "P" in the body of the application font is red

3. Class selector: Can be applied to multiple identical styles such as <style>.tt{color:red;} </style> for body all class= "TT" Application font is red

4.<style>.tt,.aa{color:red;} </style> set font red for class= "AA" or class= "tt"

5.<style>p. aa{color:red;} </style> find the class= "AA" under paragraph p and set the font to red

6.<style>p.aa{color:red;} </style> find class= "AA" in paragraph p and set the font to red

Width Wight Height 100% font size: text-size:14px font color: text-font:red; Font type: text-family: "Microsoft Ya Hei"

CSS style Beginner

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.