K
K
Kot Matpockuh2016-08-31 14:27:12
css
Kot Matpockuh, 2016-08-31 14:27:12

SVG sprites, how to use them correctly?

Hello.
There is a question. I use svg in the project, there can be 5-20 such icons on the page. Which does not have a very good effect on the productivity of the download (after all, what to download a sprite, and what to go to the server 20 times).
But there are problems with this optimization: the same icon can be used both as src for img and as background
... in html and css?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
V Sh., 2016-08-31
@kot_matpockuh

If these are icons, then this is definitely a decor. If this is a decor, then it should be done in CSS without using img, because the latter is used for content data. There are many sites where you upload pictures, and at the end you get a sprite glued from them and a css file to work with the resulting sprite.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question