D
D
Dmitry Onatsky2016-11-13 22:35:30
css
Dmitry Onatsky, 2016-11-13 22:35:30

Why is the data url image not scaled in the block?

There is a 32px by 32px block. In its properties I write:

background: url(data:image/svg+xml;base64,......) no-repeat;
background-size: cover;

The SVG itself has the same dimensions as the block, and everything seems to be fine, but when scaling, the image does not move, it seems to be fixed and remains the same size. I don't understand what to do? Of course, you can insert it directly into the SVG code, and everything is ok, but you need it through CSS.
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergei Nazarenko, 2016-11-13
@nazares

https://codepen.io/nazares/pen/BQKOeL

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question