This translation is incomplete. Please help translate this article from English.

Псевдо класовете са думи, описващи състояния на елементите. Например ако искаме да направим едно заглавие червено, когато се мине с мишката върху него можем да използваме :hover (псевдо клас)

h1:hover {
  color: red;
}

 

Note: Не бъркайте псевдо класове със  Псевдо елементите - вторите се използват за стилизиране на опрделена част от html елемент. 

Синтакс:

selector:pseudo-class {
  property: value;
}

Like regular classes, you can chain together as many pseudo-classes as you want in a selector.

Индекс на стандартни псевдо класове:

Specifications

Specification Status Comment
Fullscreen API Living Standard Defined :fullscreen.
HTML Living Standard Living Standard No change from HTML5.
Selectors Level 4 Working Draft Defined :any-link, :local-link, :scope, :active-drop-target, :valid-drop-target, :invalid-drop-target, :current, :past, :future, :placeholder-shown, :user-error, :blank, :nth-match(), :nth-last-match(), :nth-column(), :nth-last-column(), and :matches().
No significant change for pseudo-classes defined in Selectors Level 3 and HTML5 (though semantic meaning not taken over).
HTML5 Recommendation Defined the semantic meaning, in the HTML context, of :link, :visited, :active, :enabled, :disabled, :checked, and :indeterminate.
Defined :default, :valid, :invalid, :in-range, :out-of-range, :required, :optional, :read-only, :read-write, and :dir().
CSS Basic User Interface Module Level 3 Candidate Recommendation Defined :default, :valid, :invalid, :in-range, :out-of-range, :required, :optional, :read-only, and :read-write, but without the associated semantic meaning.
Selectors Level 3 Recommendation Defined :target, :root, :nth-child(), :nth-last-of-child(), :nth-of-type(), :nth-last-of-type(), :last-child, :first-of-type, :last-of-type, :only-child, :only-of-type, :empty, and :not().
Defined the syntax of :enabled, :disabled, :checked, and :indeterminate, but without the associated semantic meaning.
No significant change for pseudo-classes defined in CSS Level 2 (Revision 1).
CSS Level 2 (Revision 1) Recommendation Defined :lang(), :first-child, :hover, and :focus.
No significant change for pseudo-classes defined in CSS Level 1.
CSS Level 1 Recommendation Defined :link, :visited, and :active, but without the associated semantic meaning.

Вижте също:

Етикети за документа и сътрудници

 Допринесли за тази страница: Flinstone87
 Последно обновяване от: Flinstone87,