博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Windows下使用Glue 生成 CSS spite
阅读量:6181 次
发布时间:2019-06-21

本文共 7124 字,大约阅读时间需要 23 分钟。

  hot3.png

##Windows下使用Glue 生成 CSS spite 更多平台下的使用方法请参考官网 ###准备工作

  1. 如何本地没有安装Python2.7的话 需要安装一下..
  2. 安装 PIL(Python Imaging Library) ()
  3. 安装 Python’s easy_install for Python 2.7.
  4. 把Python的脚本目录添加到环境变量 PATH 中,添加C:\Python27\Scripts;
  5. Start the cmd and type
    $ easy_install glue

等待命令行完成 在此输入图片描述

###开始工作 准备一个图片的文件夹 ,我这里准备了一个叫 source 的图片目录, 在此输入图片描述 新建一个空目录 sprite 然后使用命令 glue source sprite 生成新的图片的CSS 速度非常之快啊。

生成的文件

在此输入图片描述

生成的图片

在此输入图片描述

css代码:

/* glue: 0.3 hash: 3dfa3abe41 */.sprite-source-9,.sprite-source-8,.sprite-source-72,.sprite-source-71,.sprite-source-70,.sprite-source-7,.sprite-source-69,.sprite-source-68,.sprite-source-67,.sprite-source-66,.sprite-source-65,.sprite-source-64,.sprite-source-63,.sprite-source-62,.sprite-source-61,.sprite-source-60,.sprite-source-6,.sprite-source-59,.sprite-source-58,.sprite-source-57,.sprite-source-56,.sprite-source-55,.sprite-source-54,.sprite-source-53,.sprite-source-52,.sprite-source-51,.sprite-source-50,.sprite-source-5,.sprite-source-49,.sprite-source-48,.sprite-source-47,.sprite-source-46,.sprite-source-45,.sprite-source-44,.sprite-source-43,.sprite-source-42,.sprite-source-41,.sprite-source-40,.sprite-source-4,.sprite-source-39,.sprite-source-38,.sprite-source-37,.sprite-source-36,.sprite-source-35,.sprite-source-34,.sprite-source-33,.sprite-source-32,.sprite-source-31,.sprite-source-30,.sprite-source-3,.sprite-source-29,.sprite-source-28,.sprite-source-27,.sprite-source-26,.sprite-source-25,.sprite-source-24,.sprite-source-23,.sprite-source-22,.sprite-source-21,.sprite-source-20,.sprite-source-2,.sprite-source-19,.sprite-source-18,.sprite-source-17,.sprite-source-16,.sprite-source-15,.sprite-source-14,.sprite-source-13,.sprite-source-12,.sprite-source-11,.sprite-source-10,.sprite-source-1{background-image:url('source.png');background-repeat:no-repeat}.sprite-source-9{background-position:0px 0px;width:16px;height:16px;}.sprite-source-8{background-position:-16px 0px;width:16px;height:16px;}.sprite-source-72{background-position:0px -16px;width:16px;height:16px;}.sprite-source-71{background-position:-16px -16px;width:16px;height:16px;}.sprite-source-70{background-position:-32px 0px;width:16px;height:16px;}.sprite-source-7{background-position:-32px -16px;width:16px;height:16px;}.sprite-source-69{background-position:0px -32px;width:16px;height:16px;}.sprite-source-68{background-position:-16px -32px;width:16px;height:16px;}.sprite-source-67{background-position:-32px -32px;width:16px;height:16px;}.sprite-source-66{background-position:-48px 0px;width:16px;height:16px;}.sprite-source-65{background-position:-48px -16px;width:16px;height:16px;}.sprite-source-64{background-position:-48px -32px;width:16px;height:16px;}.sprite-source-63{background-position:0px -48px;width:16px;height:16px;}.sprite-source-62{background-position:-16px -48px;width:16px;height:16px;}.sprite-source-61{background-position:-32px -48px;width:16px;height:16px;}.sprite-source-60{background-position:-48px -48px;width:16px;height:16px;}.sprite-source-6{background-position:-64px 0px;width:16px;height:16px;}.sprite-source-59{background-position:-64px -16px;width:16px;height:16px;}.sprite-source-58{background-position:-64px -32px;width:16px;height:16px;}.sprite-source-57{background-position:-64px -48px;width:16px;height:16px;}.sprite-source-56{background-position:0px -64px;width:16px;height:16px;}.sprite-source-55{background-position:-16px -64px;width:16px;height:16px;}.sprite-source-54{background-position:-32px -64px;width:16px;height:16px;}.sprite-source-53{background-position:-48px -64px;width:16px;height:16px;}.sprite-source-52{background-position:-64px -64px;width:16px;height:16px;}.sprite-source-51{background-position:-80px 0px;width:16px;height:16px;}.sprite-source-50{background-position:-80px -16px;width:16px;height:16px;}.sprite-source-5{background-position:-80px -32px;width:16px;height:16px;}.sprite-source-49{background-position:-80px -48px;width:16px;height:16px;}.sprite-source-48{background-position:-80px -64px;width:16px;height:16px;}.sprite-source-47{background-position:0px -80px;width:16px;height:16px;}.sprite-source-46{background-position:-16px -80px;width:16px;height:16px;}.sprite-source-45{background-position:-32px -80px;width:16px;height:16px;}.sprite-source-44{background-position:-48px -80px;width:16px;height:16px;}.sprite-source-43{background-position:-64px -80px;width:16px;height:16px;}.sprite-source-42{background-position:-80px -80px;width:16px;height:16px;}.sprite-source-41{background-position:-96px 0px;width:16px;height:16px;}.sprite-source-40{background-position:-96px -16px;width:16px;height:16px;}.sprite-source-4{background-position:-96px -32px;width:16px;height:16px;}.sprite-source-39{background-position:-96px -48px;width:16px;height:16px;}.sprite-source-38{background-position:-96px -64px;width:16px;height:16px;}.sprite-source-37{background-position:-96px -80px;width:16px;height:16px;}.sprite-source-36{background-position:0px -96px;width:16px;height:16px;}.sprite-source-35{background-position:-16px -96px;width:16px;height:16px;}.sprite-source-34{background-position:-32px -96px;width:16px;height:16px;}.sprite-source-33{background-position:-48px -96px;width:16px;height:16px;}.sprite-source-32{background-position:-64px -96px;width:16px;height:16px;}.sprite-source-31{background-position:-80px -96px;width:16px;height:16px;}.sprite-source-30{background-position:-96px -96px;width:16px;height:16px;}.sprite-source-3{background-position:-112px 0px;width:16px;height:16px;}.sprite-source-29{background-position:-112px -16px;width:16px;height:16px;}.sprite-source-28{background-position:-112px -32px;width:16px;height:16px;}.sprite-source-27{background-position:-112px -48px;width:16px;height:16px;}.sprite-source-26{background-position:-112px -64px;width:16px;height:16px;}.sprite-source-25{background-position:-112px -80px;width:16px;height:16px;}.sprite-source-24{background-position:-112px -96px;width:16px;height:16px;}.sprite-source-23{background-position:0px -112px;width:16px;height:16px;}.sprite-source-22{background-position:-16px -112px;width:16px;height:16px;}.sprite-source-21{background-position:-32px -112px;width:16px;height:16px;}.sprite-source-20{background-position:-48px -112px;width:16px;height:16px;}.sprite-source-2{background-position:-64px -112px;width:16px;height:16px;}.sprite-source-19{background-position:-80px -112px;width:16px;height:16px;}.sprite-source-18{background-position:-96px -112px;width:16px;height:16px;}.sprite-source-17{background-position:-112px -112px;width:16px;height:16px;}.sprite-source-16{background-position:-128px 0px;width:16px;height:16px;}.sprite-source-15{background-position:-128px -16px;width:16px;height:16px;}.sprite-source-14{background-position:-128px -32px;width:16px;height:16px;}.sprite-source-13{background-position:-128px -48px;width:16px;height:16px;}.sprite-source-12{background-position:-128px -64px;width:16px;height:16px;}.sprite-source-11{background-position:-128px -80px;width:16px;height:16px;}.sprite-source-10{background-position:-128px -96px;width:16px;height:16px;}.sprite-source-1{background-position:-128px -112px;width:16px;height:16px;}

转载于:https://my.oschina.net/redhu/blog/145058

你可能感兴趣的文章
第十一章:可绑定的基础结构(二)
查看>>
机械设备制造业上云之路
查看>>
spring及springboot整合redis
查看>>
随笔 - debian8 配置 WIFI
查看>>
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found
查看>>
Centos禁用多次登陆失败IP
查看>>
教你如何成为一名区块链工程师!
查看>>
Java POI重复读取excel:stream closed,回退流PushbackInputStream解决
查看>>
iOS 'The sandbox is not sync with the Podfile.lock'问题解决
查看>>
visual studio code emmet 插件不提示?解决方案
查看>>
给图片添加文字水印
查看>>
讨论 |如何实现金融平等:技术究竟是缩小还是拉大了贫富差距?
查看>>
python PIL 图像处理库简介(一)
查看>>
吴恩达《机器学习》课程总结(3)线性代数回顾
查看>>
网页字体设置
查看>>
Java,Python,Scala比较(二)类与继承
查看>>
高级语言课程设计报告第六次报告: 模拟
查看>>
NotePad++中如何把横向闪烁光标( _ )修改成竖向闪烁光标样式( | )?...
查看>>
“长江第一灯光秀”引关注 景观工程首次应用4G 路由
查看>>
纯原生组件化-模块化的探索
查看>>