Home  >  Article  >  Web Front-end  >  Introduction to new features of CSS3

Introduction to new features of CSS3

零下一度
零下一度Original
2017-07-20 17:22:391290browse

Pseudo-class selector

  1. E:first-of-type: Matches the same type The first sibling element E

  2. E:last-of-type: matches the same type The last sibling element E

  3. E:first-child: matches the nth child element of its parent element, the first number For 1

  4. E:last-child: Match the nth child element from the last of its parent element, the first number is 1

  5. ##E:nth-child(n): Select the # that belongs to the nth child element of its parent element

  6. ##E:

    nth-last-child(n): Select the # that belongs to the nth last child element of its parent element

  7. ##E:
  8. only-child

    : Select the only child element that belongs to its parent element (only one can be selected)

  9. E:
  10. only-of-type

    : Select the only sibling element that belongs to its parent element

  11. E:
  12. nth-of-type(n)

    : Matches the nth sibling element E of the same type.

  13. E:
  14. nth-last-of-type(n)

    : Matches the nth sibling element from the bottom of the same type E

Hyperlink status sequence:

    a:
  1. link

    : Set the style of hyperlink a before it is visited

  2. a:
  3. visited

    : Set Hyperlink a has an outdated style when its link address has been visited

  4. a:
  5. hover

    : Sets the style of the element when its mouse hovers Style

  6. a:
  7. active

    : Set the style of the element when it is activated by the user (an event that occurs between mouse click and release)


    :
  1. root

    : Select the root element of the document

  2. E:empty: Selects every E element (including text nodes) that has no child elements.

  3. E:checked: Matches the selected element E on the user interface. (Mostly used when the input type is radio and checkbox)

  4. ##E:

    enabled: Select each enabled The E element (the text box does not have the disabled attribute)

  5. ##E:
  6. disabled

    : Select each disabled E element (the text box has the disabled attribute) E::

    selection
  7. : Select the element selected by the user.

The above is the detailed content of Introduction to new features of CSS3. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn