mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
link pseudo classes info added (#4129)
This commit is contained in:
parent
4289fab037
commit
bc74b8ebe6
@ -102,19 +102,24 @@ div.some-parent.class-name { }
|
|||||||
/* There are some selectors called pseudo classes that can be used to select an
|
/* There are some selectors called pseudo classes that can be used to select an
|
||||||
element only when it is in a particular state */
|
element only when it is in a particular state */
|
||||||
|
|
||||||
/* for example, when the cursor hovers over an element */
|
/* for example, when a link hasn't been visited */
|
||||||
selector:hover { }
|
selected:link { }
|
||||||
|
|
||||||
/* or a link has been visited */
|
/* or a link has been visited */
|
||||||
selector:visited { }
|
selector:visited { }
|
||||||
|
|
||||||
/* or hasn't been visited */
|
|
||||||
selected:link { }
|
|
||||||
|
|
||||||
/* or an element is in focus */
|
/* or an element is in focus */
|
||||||
selected:focus { }
|
selected:focus { }
|
||||||
|
|
||||||
/* any element that is the first child of its parent */
|
/* or when the cursor hovers over an element */
|
||||||
|
selector:hover { }
|
||||||
|
|
||||||
|
/* or when a link is clicked on */
|
||||||
|
selector:active { }
|
||||||
|
|
||||||
|
/* These pseudo classes regarding links should always be written in the above order or the code might not work as expected */
|
||||||
|
|
||||||
|
/* Any element that is the first child of its parent */
|
||||||
selector:first-child {}
|
selector:first-child {}
|
||||||
|
|
||||||
/* any element that is the last child of its parent */
|
/* any element that is the last child of its parent */
|
||||||
|
Loading…
Reference in New Issue
Block a user