jquery特效 幻灯片效果,效果图如下: 复制代码 代码如下: jquery特效 <BR>/* CSS Document */ <BR>body,h1,h2,h3,h4,h5,h6,p,ul,ol,li,form,img,dl,dt,dd,table,th,td,blockquote,fieldset,div,strong,label,em{margin:0;padding:0;border:0;} <BR>ul,ol,li{list-style:none;} <BR>input,button{margin:0;font-size:12px;vertical-align:middle;} <BR>body{font-size:12px;font-family:Arial, Helvetica, sans-serif; text-align:center; margin:0 auto; } <BR>table{border-collapse:collapse;border-spacing:0;} <BR>a{ color:#333; text-decoration:none;} <BR>.box{ width:420px; margin:20px auto; position:relative; overflow:hidden; text-align:left;} <BR>.box img{border:0px; width:420px;} <BR>.big{ width:100%; float:left; height:196px; overflow:hidden; margin-bottom:2px;} <BR>.big a{ display:none;} <BR>.big span{ position:absolute; left:0; top:167px; font-size:13px; color:#fff; z-index:11; height:30px; line-height:30px; text-indent:1em; width:100%; )} <BR>.num{ width:424px; margin-right:-24px; float:left; height:53px; padding-top:2px;} <BR>.num li{ width:99px; padding-top:5px; padding-left:1px; cursor:pointer; float:left; margin-right:6px;height:48px;} <BR>.num img{ width:98px;} <BR>.num li.on{ background:url(../images/bg01.gif) no-repeat 0 0;} <BR>.txtbg{ position:absolute; left:0; top:167px; width:100%; height:30px; background:#000; opacity:0.5;filter:alpha(opacity=50); z-index:10;} <BR> <BR>var timer; <BR>var i=-1; <BR>var offset=3000; <BR>function roll(){ <BR>i++; <BR>if(i>3){ <BR>i=0; <BR>} <BR>slide(i); <BR>timer=setTimeout(roll,offset) <BR>} <BR>function slide(i){ <BR>$('.big a').eq(i).fadeIn().siblings().hide(); <BR>$('.num li').eq(i).siblings().removeClass('on'); <BR>$('.num li').eq(i).addClass('on'); <BR>} <BR>function stopBig(){ <BR>$('.big').hover(function(){ <BR>clearTimeout(timer); <BR>},function(){ <BR>timer=setTimeout(roll,offset); <BR>}); <BR>} <BR>function stoproll(){ <BR>$('.num li').hover(function(){ <BR>clearTimeout(timer); <BR>i=$(this).index(); <BR>slide(i); <BR>},function(){ <BR>timer=setTimeout(roll,offset); <BR>}) <BR>} <BR>$(function(){ <BR>roll(); <BR>stoproll(); <BR>stopBig() <BR>}) <BR> 标题1 标题2 标题3 标题4/span>