I set up my a
elements to have opacity: 0.6
when they are hovered, yet this also affects my tooltips and fades them.
I am using Bootstrap 4.
I have tried the following with/without data-
, :hover
and >
.
img[data-toggle=tooltip]:hover .tooltip { opacity: 1 }
a *[data-toggle=tooltip] .tooltip { opacity: 1 }
a:hover > img[data-toggle=tooltip] > .tooltip { opacity: 1 }
Here is the style that it's conflicting with (which is before the styles above, so it should be applied:
a:hover {
color: red;
opacity: 0.6;
text-decoration: none;
}
a:focus {
color: red;
opacity: 0.3;
outline: 0;
text-decoration: none;
}
And this is how I have it set up in my HTML:
<a href="#">
<img class="card botdrop foot-brand" data-toggle="tooltip"
data-placement="top"
data-title="Twitter"
src="picture.png"
data-original-title=""
title="">
</a>
How can I make it so the tooltip is fully opaque when it appears and not opacity: 0.6
?