jQuery实现轮播图及其原理详解实现轮播图及其原理详解
本文实例为大家分享了jQuery实现轮播图及其原理的具体代码,供大家参考,具体内容如下
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-
scale=1.0, user-scalable=no">
<title>JQuery轮播图</title>
<style>
*{
padding:0;
margin:0;
}
.container{
width:600px;
height:400px;
overflow: hidden;
position:relative;
margin:0 auto;
}
.list{
width:3000px;
height:400px;
position:absolute;
}
.list>img{
float:left;
width:600px;
height:400px;
}
.pointer{
position:absolute;
width:100px;
bottom:20px;
left:250px;
}
.pointer>span{
cursor:pointer;
display:inline-block;
width:10px;
height:10px;
background: #7b7d80;
border-radius:50%;
border:1px solid #fff;
}
.pointer .on{
background: #28a4c9;
}
.arrow{
position:absolute;
text-decoration:none;
width:40px;
height:40px;
background: #727d8f;
color:#fff;
font-weight: bold;
line-height:40px;
text-align:center;
top:180px;
display:none;
}
.arrow:hover{
background: #0f0f0f;