CSS: Pseudo-Class Selectors
These are misc CSS: Pseudo Class selectors.
Match Links
a:link-
Match a link.
a:visited-
Match visited link.
/* make link to have underline only when mouse hovers over it */ a:visited, a:link {text-decoration:none;} a:hover {text-decoration:underline;}
Match User Action
tag:hover-
mouse hover over a element tag
tag:active-
Match a link that's clicked on but mouse button not yet released.
tag:focus-
when a element is in focus (receive keys, etc. Click on a element to put focus to it.)
Match Target
tag:target-
Match tag that has a
idattribute value same as the current URL#fragment.
User Interface Pseudo-Class
tag:enabled-
Match a user interface tag that is enabled.
tag:disabled-
Match a user interface tag that is disabled
tag:checked-
Match a user interface tag which is checked (e.g. radio-button, checkbox)
tag:indeterminate-
?
Match Language
tag:lang(v)-
Match tag if its value of
langattribute is v./* make Chinese paragraphs red. */ p:lang(zh) {color:red;}
CSS, pseudo-element and pseudo-class
CSS, Selectors
- CSS: Selector Tutorial
- CSS: Selector: Match Tag Name
- CSS: Selector: Match Attribute
- CSS: Selector: Match Root Element
- CSS: Selector: Match Parent
- CSS: Selector: Match Children
- CSS: Selector: Match Sibling
- CSS: Pseudo-Class Selectors
- CSS: Pseudo-Element Selectors
- CSS: Selector Negation
- CSS: Selector Syntax Shortcuts