Reputation: 1360
I'm trying to apply bootstrap template. There is an issue about mouse hover effect.
If I click some elements that have href
attribute, the hover effect does not disappear until I click somewhere again.
How to I make the effect disappear after clicking and move cursor away?
a {
color: #212529;
-webkit-transition: all 0.2s;
transition: all 0.2s;
}
a:focus, a:hover {
color: #0085A1;
}
Upvotes: 1
Views: 913
Reputation: 11
Try taking off the a:focus off it?
Just do:
a:hover {
color: #0085A1;
}
I think its because when you hover on it, it gives focus to that button, so it stays that color.
Upvotes: 1
Reputation: 71
if you click a link" the focus
style will stick since this is the element that is let's say "Selected" by your cursor, simply remove the a:focus
from the styling.
Upvotes: 2