CSS thorough research (1)

Source: Internet
Author: User
CSS thorough research (1)

Github Pages Blog

Basic Selector

Tag Selector h1 {...}

Category. class_name{.}, two classes simultaneously, such as class = ' One two ', conflicts take the former

ID selector #id {...}

Composite selector: Two or more selectors that connect in different ways

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

The A_selector selector, B_selector is also a plurality of selectors

Descendant Selector

div p {/* div below P, including all Descendants */}

direct descendants of Div>pdiv

CSS Inheritance

The contained small container inherits the style of the large container containing it.

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

The above is the CSS thorough research (1) of the content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • Related Article

    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.