summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGreet <43548163+GreetVdL@users.noreply.github.com>2023-12-14 16:00:20 +0100
committerGitHub <noreply@github.com>2023-12-14 16:00:20 +0100
commitbc74b8ebe6fbd815c8e400bade1934014a9fb1f8 (patch)
tree0f864b99d94303b6fff0b7d59855fbf981ae0398
parent4289fab037afdb0296c88ab2503762fbc462f9d3 (diff)
link pseudo classes info added (#4129)
-rw-r--r--css.html.markdown17
1 files changed, 11 insertions, 6 deletions
diff --git a/css.html.markdown b/css.html.markdown
index b8adc886..948b70ac 100644
--- a/css.html.markdown
+++ b/css.html.markdown
@@ -102,19 +102,24 @@ div.some-parent.class-name { }
/* There are some selectors called pseudo classes that can be used to select an
element only when it is in a particular state */
-/* for example, when the cursor hovers over an element */
-selector:hover { }
+/* for example, when a link hasn't been visited */
+selected:link { }
/* or a link has been visited */
selector:visited { }
-/* or hasn't been visited */
-selected:link { }
-
/* or an element is in 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 {}
/* any element that is the last child of its parent */