Should we try to use css sprite as much as possible?
Can we use 开发者_StackOverflowwhole page design jpg file as css-sprite without slicing?
You can, but it generally requires a lot of planning and careful development. For example, if you need to add a new icon/image to a page and you suddenly find your sprite image is not big enough, you have to go through and change all images on the page to use whatever new layout you come up with.
No. Most designs includes one or more images which are:
Content images, which should be included with <img>
and have suitable alt text.
and/or
Images which tile in 2 dimensions, which can't be sprited.
as mentioned by codeka, you can. but you'll end up with a really big .jpg with a lot of white space if you plan to use the whole page as a sprite without slicing
You also probably don't want to use jpg for everything. Some things are better with jpg, some with png (or gif).
精彩评论