开发者

Combining multiple SVGs to avoid HTTP requests

开发者 https://www.devze.com 2023-01-17 10:15 出处:网络
We all know CSS sprites - a method to combine multiple images into o开发者_Python百科ne and thus avoiding the need for many HTTP requests. However, I am using SVG, so, combining them into one is not a

We all know CSS sprites - a method to combine multiple images into o开发者_Python百科ne and thus avoiding the need for many HTTP requests. However, I am using SVG, so, combining them into one is not as obvious. How would I accomplish this with SVG? Is it wise idea to put the SVG into the document at the bottom? What if it's an application and not a website?


You can use SVG images for CSS sprites just as you would with, e.g. PNG images but instead of GIMP/Photoshop for editing, you should be able to use Inkscape. If you do, it's best to save as plain SVG rather than Inkscape SVG, as this will remove a lot of extraneous meta data and reduce the full size. Hope this is the kind of info you're after.

0

精彩评论

暂无评论...
验证码 换一张
取 消