Yes we can use the css sprite concept to create the banners if it is static and won't change in the future.
If the banners are dynamic, we won't use the concept of css sprites.
<div id="bannerrotation">
<ul>
<li><img src="" class="img1"/></li>
<li><img src="" class="img2"/></li>
<li><img src="" class="img3"/></li>
</ul>
</div>
#bannerrotation ul li img {background-image:url(banners.jpg);}
.img1{background-position:10px 10px;}
.img2{background-position:10px 50px;}
.img3{background-position:10px 100px;}
like this we cann apply.
If the banners are dynamic, we won't use the concept of css sprites.
<div id="bannerrotation">
<ul>
<li><img src="" class="img1"/></li>
<li><img src="" class="img2"/></li>
<li><img src="" class="img3"/></li>
</ul>
</div>
#bannerrotation ul li img {background-image:url(banners.jpg);}
.img1{background-position:10px 10px;}
.img2{background-position:10px 50px;}
.img3{background-position:10px 100px;}
like this we cann apply.
No comments:
Post a Comment