html中轮播代码,要JS的轮播代码!希望效果如下图,类似也行!

请直接复制我的以下代码修改!我好复制直接使用,本人菜鸟!记住样式!
CSS;
#header{
width:600px;
height:300px;
margin-left:auto;
margin-right:auto;
}
HTML:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>

<body>
<div id="header"></div>
</body>
</html>

第1个回答  2015-02-02
这个有插件的。
可以看看这个:http://www.17sucai.com/pins/demoshow/7446
还有这个:http://www.17sucai.com/pins/demoshow/7486

我觉得最合你心意的就是这个了:http://www.17sucai.com/pins/demoshow/6451可以下载哦,如果你不能下载,我可以帮你,我有积分可以用
第2个回答  2015-02-02
var t;
var btn=$(".lst");
var img=$("img"),index=0,len=btn.length;
function showimg(index){
img.hide().eq(index).fadeIn();
btn.removeClass("active").eq(index).addClass("active");
};
btn.on("mouseover",function(){
var index=btn.index($(this));
$(this).toggleClass("active");
showimg(index);
}).eq(0).mouseover();
$(".banner").hover(function(){
clearInterval(t);
},function(){
t=setInterval(function(){
showimg(index);
index++;
if(index==len){index=0;}
},2000);
}).trigger("mouseleave");追问

我不是说了吗?请复制我以上的代码然后插入你的代码!你这样我怎么弄?我又没学过JS!我要学过我直接在网上找代码了,然后自己插了!

本回答被网友采纳