27
loading...
This website collects cookies to deliver better user experience
:hover
CSS pseudo-class triggered when the user hovers over an element with the cursor.a:hover {
color: red
}
:active
CSS pseudo-class starts when the user presses down the primary mouse button.a:active {
color: blue;
}
:active
pseudo-class is commonly used on <a>
and <button>
elements.a:visited {
color: yellow;
}
input:focus {
background-color: green;
}
hover
, active
, visited
and focus
are working.div:focus-within {
background: cyan;
}
:focus-visible
pseudo-class applies to provide a different focus indicator based on the user’s input modality (mouse vs. keyboard)..focus-visible:focus-visible {
background: pink;
color: red;
}
:focus
also do that same right? 🤔👩🏻💻 suprabha.me |