W
W
WebforSelf2021-04-16 15:51:43
css
WebforSelf, 2021-04-16 15:51:43

What is the correct way to use svg?

The question arose of such a plan, for example, there is a block with advantages.
Each advantage has its own icon.
When hovering over the block, the color of the icon should change.
All icons are provided in svg, the question is, svg data must be changed through the admin panel, but accordingly, files like name.svg cannot be loaded, then the color will not change. Who gets out of the way?
So far, the idea is only to create svg sprites and then set the sprite id to each element through the admin panel, so that it can be administrated.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sinneren, 2021-04-16
@sinneren

hang the class and through the fill or immediately the fill attribute

V
valgerofficial, 2021-04-16
@valgerofficial

Why not convert the icons to a font and use them?

S
Sagrana, 2021-04-18
@sagrana

If all icons should be just black and white, then you can use css filter

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question