码迷,mamicode.com
首页 > 其他好文 > 详细

[SVG] Combine Multiple SVGs into an SVG Sprite

时间:2017-03-02 23:11:46      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:color   mat   tip   com   roc   res   class   blog   pac   

In this lesson, we’ll explore the process of combining all of your SVG icons into one SVG sprite, to be included directly into markup. We’ll use the command line, along with the svgo and svg-sprite-generator npm packages to automate the process of compressing the SVGs and creating the sprite.

Note: This lesson assumes you have npm installed.

 

Install:

npm i - svgo svg-sprite-generator

 

Run:

svgo -f icons -o icons/out && svg-sprite-generate -d icons/out -o icons/out/sprite.svg

 

[SVG] Combine Multiple SVGs into an SVG Sprite

标签:color   mat   tip   com   roc   res   class   blog   pac   

原文地址:http://www.cnblogs.com/Answer1215/p/6492839.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!