Answer the question
In order to leave comments, you need to log in
Change svg background color?
Example
How can I make the background of the text appear on hover?
that is, brought - the background is translucent and vidosik
Answer the question
In order to leave comments, you need to log in
Just like other elements.
Specifically in your case:
let rect = document.querySelector('#mask > rect');
rect.style.fill = "rgba(255, 255, 255, 0.30)";
svg:hover #mask > text {
fill: rgb(125,125,125);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question