CSS thorough research (1)

Source: Internet
Author: User
Github Pages Blog Basic Selector
  1. Tag Selector
    }
  2. Category
    , the conflict takes the former
  3. ID Selector
    }
Composite selector: Two or more selectors that connect in different ways
  1. Intersection "' H3.class_name {...} The first one must be a tag selector, the second must be (category selector) or (ID selector), no space in the middle, must be written continuously
  2. and set selector aselector, b selector ismore than one selector
  3. Descendant Selector
    div p {/* div below P, including all Descendants */} '
    Direct descendants of the Div>p ' div
CSS inheritance contains small containers that inherit the style style of the large container that contains it

```

AB Cd

h1{color:red; text-decoration:underline;} em {color:blue;} As a result, EM inherits the H1 underline.

CSS Precedence

Inline style (style=) > ID style (#id) > class style (. Class) > Markup Style (div)

Two class conflicts, take the former

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.