CSS style Sheets

Source: Internet
Author: User
Tags tag name

style sheet :

NOTE:/* This is a comment */

style sheets include : inline style sheets : Write directly inside tags, style properties

     Inline style sheet : written in the head tag, <style type= "text/css" > tag style ... </style>

      external style sheet : New CSS file drop style sheet, referencing in HTML

<link href= "O.css" rel= "stylesheet" type= "Text/css" > Rel property defines the style label associated with the label, the type attribute defines the document types
Selectors: Inline style sheets, external style sheets

1.Tag Selector : Do selector p{style with tag name}

2,class selector :. At the beginning, the Tag property class calls The style definition style:. main{style} call style <p class= "main" ></p>

3.ID selector : # Start, Tag property ID call style definition style: #main {style} call style: <p id= "main" ></p> ID unique

4, composite selector : With a comma "," separated by the same side p,span{}/* Label P, span the same style */

Use a space "" to separate the descendants. Main p{}/* Find a label that uses the style Mian, and then change the label's P tag to use the style */

Filter "." p.sp{}/* in the label P class= "SP", execute the style sheet */

style properties: 1, background and foreground: background ...

2. Fonts: Font ...

3,border (table border, style, etc.),margin (outside the table spacing). padding (content vs. cell spacing)

The style of the link:

A:link hyperlink is pre-state

a:visited Hyperlink post-click Status

A:hover Hover over hyperlinks

A:active When you click the hyperlink

When defining these states, there is a sequence L v h a

        


CSS style Sheets

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.