1、添加gulpfile.js文件,编辑合成sprite的代码。
2、在gulpfile.js所在目录下,运行gulp命令,在你所需要合成图片的目录下生成sprite.png和sprite.css。
3、多个图片文件夹一次依此按照上面步骤,修改地址,在不同目录下生成sprite.png和sprite.css。
4、将所有sprite.css的代码拷贝到icon.less中。
5、需要用的时候,@import icon.less 即可直接引用图表css函数。
1、添加gulpfile.js文件,编辑合成sprite的代码。
2、在gulpfile.js所在目录下,运行gulp命令,在你所需要合成图片的目录下生成sprite.png和sprite.css。
3、多个图片文件夹一次依此按照上面步骤,修改地址,在不同目录下生成sprite.png和sprite.css。
4、将所有sprite.css的代码拷贝到icon.less中。
5、需要用的时候,@import icon.less 即可直接引用图表css函数。