compass制作sprite雪碧图
2015-08-11 17:07
239 查看
1.安装compass。(需要先安装ruby)
命令行:gem install compass
2.新建一个compass 项目
命令行:compass create myproject
3.在myproject中新建一个images文件夹,将需要转换的图片放入images新建的share文件中
并在scss文件中写入:
@import "compass/utilities/sprites";
@import "share/*.png";
@include all-share-sprites;
命令行:compass compile
完成,images文件夹下会显示雪碧图
注意:ruby对编码的苛刻,路径,命名不能有中文以及非法字符
命令行:gem install compass
2.新建一个compass 项目
命令行:compass create myproject
3.在myproject中新建一个images文件夹,将需要转换的图片放入images新建的share文件中
并在scss文件中写入:
@import "compass/utilities/sprites";
@import "share/*.png";
@include all-share-sprites;
命令行:compass compile
完成,images文件夹下会显示雪碧图
注意:ruby对编码的苛刻,路径,命名不能有中文以及非法字符
相关文章推荐
- 数据库基础
- IOS第八天(6:UITableViewController新浪微博, 模型和 控件位置封装一起statusFrame)
- Ubuntu下编译运行Kamailio
- Cocos2d-x中,在过渡场景异步加载图片和声音
- 最美应用-从Android研发工程师的角度之[最美时光]
- RTP-RTCP协议分析
- android媒体--图库与API层MediaPlayer的交互
- 关于环信即时通信的使用小结
- 高级查询与索引
- [Linux]查看系统信息方法汇总
- JAVA,Play framework 入门,打印hello word
- 欢迎使用CSDN-markdown编辑器
- 安慰奶牛 解题报告
- Android开发者必知的5个开源库
- 按Home按键退出应用后重新启动该应用无法返回到最后打开页面的解决方案
- MySQL Study之--Percona Server版本
- eclipse Android关联源码
- 使用 getopts 处理命令行参数
- Intent Action 大全
- 黑马程序员————IO流(2)