Answer the question
In order to leave comments, you need to log in
Many svg images in one file for the background - how to set?
I heard that you can save several svg images in one file on different artboards so that there are fewer requests. And in theory, the path to the desired artboard is written quite simply (and not like in png sprites, the lower left corner and percentages ...).
Tell me, who knows how to register the correct path?
Answer the question
In order to leave comments, you need to log in
htmlhook.ru/svg-image-sprite.html - !!!
nano.sapegin.ru/all/vyorstka-vektornogo-logotipa-s...
noteskeeper.ru/1061
Grigory , it doesn’t work (
after saving the ai file in svg, I open this svg in the editor. everything seems to be ok, there are <g id="lay01">
and so on according to the number of artboards. I insert it as a background:
.p1 {
background-image:url(../i/patterns_all.svg#lay01);
}
<g id="lay01" class="svgpattern">
and registered in styles, as advised in the first link:.svgpattern { display: none; }
.svgpattern:target { display: inline; }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question