CSS3 01. CSS3 status, attribute selector, pseudo-class selector,

Source: Internet
Author: User

CSS 3 Status

Poor compatibility, need to add private prefix/mobile better than PC-side/continuous improvement/progressive enhancement/Consideration of user groups/product-compliance programs;

CSS3 manuals need to be read-read and use guidelines

[] means all options available

|| Or

| Indicates a multiple selection

? Represents 0 or 1 of

* Indicates 0 or more

{} indicates that the range {A} represents the occurrence of a, {A, b} represents the occurrence of more than a second, B can be omitted, {A,} represents at least a, no upper limit

# More than 1 occurrences, separated by commas, can be selected with curly braces to indicate exactly how many repetitions: <length>#{1,4}.

! The representation appears to produce a value, even if the value within the group can be omitted, but at least one value cannot be omitted: [A? B? c?]!

Property Selector

Tag Selector/class name selector/id selector/descendant selector/Tag designation (intersection) selector/set selector/descendant selector/wildcard

Div+p: The first p after selecting a div

Div~p: Select div after all P

The following 5 forms are specific:

E[ATTR] indicates that the attr attribute is present: Div[class]

E[attr=val] indicates that the property value is exactly equal to Val:div[class=mydemo];

E[attr*=val] indicates that the attribute value contains the Val character and is in " any " position; Div[class*=mydemo]

E[attr^=val] indicates that the attribute value contains the Val character and is in the " starting " position; Div[class^=mydemo]

E[attr$=val] indicates that the attribute value contains the Val character and is in the " end " position; Div[class$=mydemo]

Pseudo-Class selectors:

: Link. Normal state

: viaited has asked the link

: Hover mouse over

: Action Click

CSS3 additional pseudo-class selectors

With an element relative to its

CSS3 01. CSS3 status, attribute selector, pseudo-class selector,

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.