A
A
Alexander Vladimirovich2017-11-01 12:28:40
css
Alexander Vladimirovich, 2017-11-01 12:28:40

How to insert svg, which is written in the html code of the page, into the background of another element?

there is a page, and svg is inserted into it right in the html code.
how to insert link to this svg in background-image?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
A person from Kazakhstan, 2017-11-01
@LenovoId

copy the svg code and paste it into a file (fon.svg for example) and apply...

T
tyzberd, 2017-11-01
@tyzberd

there are svg sprites https://css-tricks.com/svg-sprites-use-better-icon...
https://css-tricks.com/svg-use-with-external-refer...
svg can be added both on the page and in a separate file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question