CSS pseudo Class (lower) structural pseudo class \ui pseudo class \ Dynamic pseudo class and other pseudo class valid check Enable child required link visit

Source: Internet
Author: User

  1. Pseudo class selector Rollup
    There are 4 pseudo-class selectors, structural pseudo-class \ui pseudo class \ Dynamic pseudo class and other pseudo class. Specific as follows

  2. structural pseudo-class selector structural pseudo-class selector
    It is able to select elements based on the position of the element in the document, which has a prefix ":"
    1. The root element selector acts only on the bottom label such as HTML. Rarely used.

    : Root

                             


    2. Child Element Selector Sub-element Select all and be more detailed                                       

    Ul>li:first-child{} Add pseudo-Class First-child first

    ul>li:last-child{} Add pseudo-class last-child last     

    Ul>li:o nly-child{} adds pseudo-class only-child those only one, affects this only child

    div>p:only-of type{} Add pseudo-class Only-of-type Select the element of the specified type, in fact the function and the div& alone Gt;p similar to

     

     

    The pseudo-class needs to be preceded by a selector to restrict the scope

     

    3. Ul>li: Nth-child (2) The second child element of Li under {} ul

    Ul>li:nth-last-child (2) {} .... Countdown second

    Other:

  3. UI pseudo-Class selector

    : Enable

    :d isable

    HTML file

    CSS file

    Effect

: Checked Check the effective

HTML file

CSS file

will be checked to hide them

:d efault default, rarely used

CSS file

: Effective when valid valid

: Effective when invalid is not valid

HTML file

CSS file

By filling in the numbers, it turns green.

: Required required part is in effect

Optional is not required to enter into force

HTML file

CSS file

CSS pseudo Class (lower) structural pseudo class \ui pseudo class \ Dynamic pseudo class and other pseudo class valid check Enable child required link visit

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.