CSS pseudo-element, pseudo-class selector, and css pseudo-element Selector

Source: Internet
Author: User

CSS pseudo-element, pseudo-class selector, and css pseudo-element Selector

A pseudo-class selector is a defined selector in CSS. It cannot be named by anyone. Common taste buds selector is used on Element a, such as a: link a: visited: hover a: active

The pseudo element selector bin is not a selector for real elements, but a selector for pseudo elements defined in CSS. The following four pseudo element selectors (first-line, first-letter, berfore, after)

CSS four pseudo-element selectors

<1>

<Html> 


<2>

<Html> 

CSS: four basic structural pseudo-class selectors 1>: root

<Html> 


2>: not

<Html> 



3>: empty

<Html> 


4>: target

<Html> 


Other pseudo-class selectors emphasize that when looking for an element, instead of looking for its outer layer, z directly uses the li in the internal layer, so here we use the li element directly ;: first-child: Find the first row in each group; last-child: Find the last row in each group (li in each ul is a group)

<Html> 

Parity pseudo Selector

<Html> 


What is the difference between the parity selector in CSS and the parity selector in jquery?

<Html> 

Color change with custom N rows
<Html> 


Find the element of the same type: nth-of-type (n) |: nth-last-of-type (n)
<Html> 


Zookeeper

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.