A
A
Archer *range attack +10*2018-02-15 11:34:53
css
Archer *range attack +10*, 2018-02-15 11:34:53

How to change the scale of svg sprites when changing the scale of the page in the browser?

There is a sprite in the form of a long svg document with icons inside. Icons on the site are elements with a viewbox, in which the desired icon from the svg document is displayed as background and background position. Naturally, when you change the scale of the page in the browser (Ctrl + / Ctrl -), the icons remain the same size. As far as I understand, the browser, in the case of inline svg or images, looks at their width and height, in the case of sprites, it cannot do this. Is there any solution to make the icons grow/shrink when the page is zoomed in the browser?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Peter, 2018-02-15
@petermzg

<svg style='height: 190px; width: 380px; transform: scale(0.421875);'>
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question