原装js模仿的淘宝首页无缝轮播图

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{
margin:0;
padding:0;
}
div{
width:520px;
height:280px;
position:relative;
background:pink;
margin:0 auto;
overflow:hidden;
}
div ul{
width:3640px;
position:absolute;
left:-520px;
}
div ul li{
list-style:none;
float:left;
width:520px;
height:280px;
font-size:30px;
text-align:center;
line-height:280px;
}
.prev ,.next{
width:30px;
height:50px;
position:absolute;
background:rgba(0,0,0,.4);
top:115px;
}
.prev:hover,.next:hover{
background:rgba(0,0,0,.6);
}
.prev{
left:0;
}
.next{
right:0;
}
.prev:after{
content:'<';
color:#fff;
line-height:50px;
text-align:center;
width:100%;
height:100%;
display:inline-block;
}
.next:after{
content:'>';
color:#fff;
line-height:50px;
text-align:center;
width:100%;
height:100%;
display:inline-block;
}
div ol{
position:absolute;
bottom:10px;
left:50%;
margin-left:-50px;
background:rgba(255,255,255,.2);
}
div ol li{
list-style:none;
float:left;
color:#fff;
width:10px;
height:10px;
border-radius:100%;
 
overflow:hidden;
text-indent:10000px;
margin:0 5px;
cursor:pointer;
}
.orange{
 
}
 
</style>
</head>

 

WEB前端学习交流群21 598399936

 

posted @ 2017-12-07 16:53  噜噜修  阅读(170)  评论(0编辑  收藏  举报