Closed jahantaila closed 2 years ago
I have the following <li> element: <li><a href="#" class="border-red hvr-bounce-to-left">JOIN</a></li>
<li>
<li><a href="#" class="border-red hvr-bounce-to-left">JOIN</a></li>
When the bounce-to-left transition occurs, I want the background color to be red, not the default blue
bounce-to-left
I set the following CSS to my <li> element:
.border-red { border: 3px solid var(--red); padding: 6px 25px !important; transition: all 0.25s ease-in-out; } .border-red:hover { background-color: red; }
However, the background remains blue, even though I set the background-color: red; property when the .border-red:hover event occurs.
background-color: red;
.border-red:hover
How can I make the background red when the user hovers over my element?
.hvr-bounce-to-left:before { background: #ff0000; } use !important if needed.
Thanks, your solution worked perfectly
I have the following
<li>
element:<li><a href="#" class="border-red hvr-bounce-to-left">JOIN</a></li>
When the
bounce-to-left
transition occurs, I want the background color to be red, not the default blueI set the following CSS to my
<li>
element:.border-red { border: 3px solid var(--red); padding: 6px 25px !important; transition: all 0.25s ease-in-out; } .border-red:hover { background-color: red; }
However, the background remains blue, even though I set the
background-color: red;
property when the.border-red:hover
event occurs.How can I make the background red when the user hovers over my element?