<style> .fadein { position:relative; height:332px; width:500px; } .fadein img { position:absolute; left:0; top:0; } </style> <script> $(function(){ $('.fadein img:gt(0)').hide(); setInterval(function(){$('.fadein :first-child').fadeOut().next('img').fadeIn().end().appendTo('.fadein');}, 7000); }); </script> <div class="fadein"> <img src="<!--{$TPL_URLPATH}-->img/index-image1.jpg"> <img src="<!--{$TPL_URLPATH}-->img/index-image2.jpg"> <img src="<!--{$TPL_URLPATH}-->img/index-image3.jpg"> </div>