当CSS sprites将是好的使用,而不是? [英] When CSS sprites would be good to use and when not?

查看:100
本文介绍了当CSS sprites将是好的使用,而不是?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在什么情况下CSS sprites将是好的使用,而不是?是时间保护还是只有服务器请求保护?



我认为带宽使用会相同,因为图像和ong的大图像一样,但是它在一个部分?

什么时候使用css sprite是一个省时(工作)选项?



对于导航,它适用于翻转预载效果,但不适合图像禁用的人?



编辑:精灵只适用于css,其他的好用法可以节省我们的时间一次和未来背景,所以我们应该尽可能在后台使用图像来保存服务器请求,是不是好主意?



更新:

要实现需要更多的时间,然后常规的方法,并且大多数客户端不担心像http请求一样慢。我的问题是,我们可以节省时间在网站制作过程和未来的网站使用css sprite维护。或常规方法就足够了。



简单来说,我的问题是:CSS sprites可以保存我们的设计器和xhtml css编码器时间请求)?

解决方案


  • CSS sprites最适合元素具有固定的宽度和高度。否则,您的sprite图片中需要大的空白空间,这可能会(取决于文件类型)稍微增加大小。


  • 由于不同的文件格式压缩图像,有时CSS精灵图像将具有明显小于单独图像的总文件大小的文件大小。这是一个不错的奖励。


  • 如前所述,sprite减少了HTTP请求开销,这可以帮助加载时间。我从来没有见过任何关于这种效果的数字。


  • Sprites会为你的CSS开发者增加一点时间。它不应该影响你的设计师。但请记住,您的开发人员编码网站一次;



In what scenarios CSS sprites would be good to use and when not? Is it time saver or only server request saver?

I think bandwidth use will be same because image is same like ong big image but it's in a parts?

When and where use of css sprite is a time saving(in work) option ?

For navigation it's good for rollover pre-loading effect but not good for images disabled people?

What are other good usage which can save our time once and in future (if changes comes in design) both?

Edit: Sprites is only for css background so should we use images in background as much as possible to save sever request, is it good idea?

Update:

To implement takes more time then regular method and mostly client do not much worry about some slowness like http request. My question is can we save time in site making process and future maintenance of website using css sprite. or regular method is enough.

In nutshell my question is: "can CSS sprites save our designer and xhtml css coder time (I'm not talking about server request)?"

解决方案

  • CSS sprites are best used for elements that have a fixed width and height. Otherwise, you need large empty spaces in your sprite image, which can (depending on file type) increase the size a bit.

  • Due to the way different file formats compress images, sometimes a CSS sprite image will have a noticeably smaller file size than the total file size of separate images. That’s a nice bonus.

  • As mentioned, sprites reduce the HTTP request overhead, which can help load time. I’ve never seen any numbers on the magnitude of this effect.

  • Sprites will add a bit of time for your CSS developers. It shouldn’t affect your designers. But bear in mind that your developers code the site up once; the benefits of sprites apply every time someone looks at the site.

这篇关于当CSS sprites将是好的使用,而不是?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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