百科游戏 手游攻略
大家好,今天小编来为大家解答淘宝全屏轮播代码这个问题,淘宝全屏的轮播代码是怎么做的很多人还不知道,现在让我们一起来看看吧!
求淘宝全屏海报轮播html代码
这是我用JQuery写的,图片自己添加
body,div,ul,ol,li,h1,h2,h3,h4,h5,h6,form,input,p,th,td{
padding:0;
margin:0;
}
table{
border-collapse:collapse;
border-spacing:0;
}
fieldset,img{
border:0;
}
ul,li{list-style:none;}
h1,h2,h3,h4,h5,h6{
font-weight:normal;
font-size:100%;
}
body
{
background-color:#ccc;
margin:0auto;
text-align:center;
}
.main
{
font-size:12px;
margin:80pxauto;
width:900px;
height:600px;
}
#container
{
width:800px;
height:449px;
position:relative;
overflow:hidden;
}
#container.image
{
position:absolute;
height:449px;
width:4800px;
}
#container.imageli
{
float:left;
width:800px;
height:449px;
position:relative;
overflow:hidden;
background:#000;
}
#container.sign
{
bottom:0px;
position:absolute;
background:url("images/bg_tran.png");
width:800px;
padding-left:600px;
}
#container.signli
{
float:left;
color:Gray;
text-align:center;
line-height:16px;
width:16px;
height:16px;
font-family:Arial;
cursor:pointer;
overflow:hidden;
margin:6px8px;
background-color:#fff;
}
#container.signli.on
{
color:White;
background-color:Maroon;
}
$(function(){
varlen=$(".image>li").length;
vari=0;
functionturn(){
i=$(".sign>li").index($(".on"))
i $(".sign>li").eq(i).addClass("on").siblings("li").removeClass("on"); showImg(i); } $(".sign>li").click(function(){ clearInterval(set); varindex=$(this).index(); $(this).addClass("on").siblings("li").removeClass("on"); showImg(index); set=setInterval(turn,5000); }); set=setInterval(turn,5000); }); functionshowImg(index){ varwidth=$("#container").width(); $(".image").stop(true,false).animate({"left":-index*width},500); } 希望对你能有所帮助。 data-widget-config="{'effect':'fade','circular':true,'navCls':'toseise','activeTriggerCls':'odslos','contentCls':'piaofu'}"> style="Z-INDEX:0;PADDING-BOTTOM:0px;MARGIN:0px;PADDING-LEFT:0px;WIDTH:1920px;PADDING-RIGHT:0px;TOP:0px;PADDING-TOP:0px;LEFT:-485px" class=J_TWidgetdata-widget-type="Carousel" data-widget-config="{
'contentCls':'slide-kun1362899830209content',
'triggerCls':'slide-kun1362899830209triggers',
'navCls':'slide-kun1362899830209triggers',
'triggerType':'mouse',
'effect':'scrollx',
'prevBtnCls':'prev',
'nextBtnCls':'next',
'steps':1,
'autoplay':true,
'viewSize':[1920],
'circular':true
}"> data-widget-config="{'trigger':'.first-trigger2','align':{'node':'.first-trigger2','offset':[0,0],'points':['cc','cc']}}"> src=http://www.hnrlzysc.com/post/"左点击"> src=http://www.hnrlzysc.com/post/"右点击">淘宝全屏的轮播代码是怎么做的