css hover selector code example
Example 1: css hover
.a:hover{background-color: black;}
Example 2: on hover css
/* Changes an element's color on hover */
.selector {
background-color: black;
}
.selector:hover {
background-color: blue;
}
Example 3: pseudo class css
.element:nth-child(1)
.element:hover
.element:visited
Example 4: css psedo class
button:hover {
color: blue;
}
A pseudo-class is a word such as :hover that makes its changes
to the selected element by adding it along side the selector
before the curly braces in CSS instead of inside the curly
braces.
You can search for a list of pseudo-class online.