I have a Drupal generated html markup that contains a button. I added an icon next to the button using the below css:
#edit-actions--3::after{
content: url("/themes/custom/mytheme/assets/icons/tooltip.svg");
display:inline-block;
width:2%;
margin-left: 0.4rem;
}
to this tooltip.svg icon, i want to add a tooltip text on hover as "this is a tooltip icon". how to do this with css alone?
PS: I cannot edit the HTML markup to add tooltip text to a span tag. so I am looking for a way to add tooltip text only through css
2
Answers
I can’t find your svg.
so i got some icon from Drupal.
replace and use that.
setting defualt as a display:none;
and hover make that display:inline-block;