Is it possible to exclude a pseudo-class having the same property as another pseudo-class from being transitioned? Please look at the following example code for your reference:
button {
height: 50px;
width: 150px;
font-size: 20px;
color: white;
border: none;
background-color: blue;
transition: all 1s ease-in 500ms;
}
button:hover {
background-color: black;
}
button:focus {
background-color: green;
}
<button class="transition">Submit</button>
What if I want to have the transition to be applied on the :hover
pseudo-class but not on the :focus
pseudo-class?