html - How to Extract one images from bunch of image(Image Pack)? -
i have seen many site displaying 1 image image pack . how can .
for example:
i want extract cross sign image.
i have rough thought can't done , have utilize css it. have improve thought it.
this technique known css sprite.
html<span class="sprite contact"></span> <span class="sprite store"></span>
css
span.sprite { height: 30px; width: 25px; display: inline-block; background-color: burlywood; background-image: url('http://www.flipkart.com/prod/images/new-vd-sprite-b2a14956.png'); background-repeat: no-repeat; } span.contact { background-position: 0 0; } span.store { background-position: 0 -80px; }
more resources:
http://css-tricks.com/css-sprites/
https://en.wikipedia.org/wiki/sprite_%28computer_graphics%29#sprites_by_css
html css html5 image
No comments:
Post a Comment