[SVG] Combine Multiple SVGs into an SVG Sprite
Posted Answer1215
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[SVG] Combine Multiple SVGs into an SVG Sprite相关的知识,希望对你有一定的参考价值。
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的主要内容,如果未能解决你的问题,请参考以下文章