Description »

Defines how an element behaves when being clicked.

Details »

:active is a pseudo-class that defines what a particular class, id, or tag looks like upon being clicked. When something is in the process of being clicked, it is said to be active. For instance, when you click on a link, the split second that you are clicking on it will cause the :active set of definitions to appear. You can see this in action, for example, on Wikipedia where when you click on a blue link, it turns yellow for as long as you are clicking on it.

If you hold the click, then the :active class will last just as long as you are holding the click.

Examples »

Try It on the CSS Zone Sandbox!

Base CSS »

Not defined in Base CSS.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License