I looked here in CSS: active selector.
Active selector styles link to active pages
It made me wonder what the "active page" is in HTML / CSS terminology ...
At this point, I went to w3docs Section: 5.11.3 Dynamic pseudo-classes :: hover ,: active and: focus.
An active pseudo-class is applied while an element is activated by the user. For example, between times, the user presses the mouse button and releases it.
So I used one of w3shools, tried its pages and hacked the example, replacing the following code, which you can just cut and paste and try.
<html> <head> <style type="text/css"> :focus,:active { outline-offset: 10px; outline: solid; } </style> </head> <body> <p>Click the links to see the background color become yellow:</p> <a href="http://www.w3schools.com">w3schools.com</a> <a href="http://www.wikipedia.org">wikipedia.org</a> <button type="button">Click Me!</button> <form> <input type="text"/> </form> </body> </html>
The form field works for: focus. But the button or links do not work for: active.
Why? There is something in the "active page". I do not understand what w3schools was talking about.
I saw this good tip when googling for it, but I donβt think it is related.
css css-selectors pseudo-class
Jgfmk
source share