CSS雪碧代gradle这个生成过程? [英] CSS Sprite generation in gradle build process?

查看:145
本文介绍了CSS雪碧代gradle这个生成过程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我读到关于JavaScript的文章,其中类似呻吟,安德提到构建工具。它简要地说明,这样的工具是能够从单独设置的文件,并且这些构建工具可以集成到构建过程产生的子画面图像的

I recently read an article about Javascript, where Build Tools like Grunt and Ender were mentioned. It was briefly stated, that such tools are capable of generating sprite images from individually provided files and that these build tools can be integrated into the build process.

不幸的是我的谷歌搜索并没有公布这方面的详细信息。
是否有人在这里有关于这个主题和融入经验的gradle?
进一步阅读一些网络资源是非常欢迎!

Unfortunately my google searches didn't unveil more information on this. Does anybody here have experience on this topic and integration into gradle? Some web resources for further reading are highly welcome!

提前感谢!
萨沙。

Many thanks in advance! Sascha.

推荐答案

@Windwalker你可能有兴趣在你gradle这个使用Maven的SmartSprites Repositry。这需要单独的图像,并使用与所需的CSS一起创建了一个精灵的形象。

@Windwalker you might be interested in using the SmartSprites Maven Repositry in your gradle. It takes individual images and creates a sprite image using that along with the required CSS.

存储库的细节可以发现,在// mvnrepository。 COM /神器/ com.carrotsearch / smartsprites / 0.2.8

The details for the repository can be found at: http://mvnrepository.com/artifact/com.carrotsearch/smartsprites/0.2.8

要安装到您的项目简单地把下面的行放在gradle这个命令:

To install it into your project simply put the following line in your gradle commands :

'com.carrotsearch:smartsprites:0.2.8'

有关的全部细节

随着智能雪碧的网站[ http://csssprites.org/ ]说:

As the website of Smart Sprite [ http://csssprites.org/ ] says:

SmartSprites将让你轻松地引进并保持CSS中的精灵
  您的设计。 SmartSprites解析您可以插入特殊指令
  到你原来的CSS标记单个图像被转变成
  精灵。然后,从收集到的图像生成的子画面图像和
  自动插入所需的CSS属性到您的风格
  片,从而使子画面来代替各个图像

SmartSprites will let you easily introduce and maintain CSS sprites in your designs. SmartSprites parses special directives you can insert into your original CSS to mark individual images to be turned into sprites. It then builds sprite images from the collected images and automatically inserts the required CSS properties into your style sheet, so that the sprites are used instead of the individual images

我希望这能解决您的情况。

I hope this solves your situation.

这篇关于CSS雪碧代gradle这个生成过程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆