I wanna to change the background-color title on hover and not when is not hover. The problem is when I hover the element the title remains with light grey color(I think is default value color). I want to change the background in black color
<a class="popover-title" data-toggle="tooltip" data-trigger="hover"
title="test"
popover-append-to-body="true">
with this style
.myStyle{
max-width: 200px;
padding: 0.25rem 0.5rem;
color: #fff;
text-align: center;
background-color: black;
border-radius: 0.25rem;
}
SOLVED
I found a solution
[data-title]:hover:after {
opacity: 1;
transition: all 0.1s ease 0.5s;
visibility: visible;
}
[data-title]:after {
content: attr(data-title);
max-width: 200px;
background-color: #000;
color: #fff;
position: absolute;
text-align: center;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
font-style: normal;
font-weight: 400;
line-height: 1.5;
z-index: 99999;
visibility: hidden;
}
[data-title] {
position: relative;
}
But the problem is when I want to put the translate it doesnt work and the tooltip returns transparant
<a class="font-weight-bold font-xs btn-block text-muted" data-toggle="tooltip" data-placement="bottom"
[attr.data-title]="'test' | translate"
popover-append-to-body="true">