JavaScript实现自动轮播
实现效果
代码如下
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>轮播图</title>
<style>
*{
padding:0;
margin: 0;
}
div{
position: relative;
width: 800px;
height: 400px;
margin: 100px auto 0 auto;
}
#view{
width: 800px;
height: 400px;
margin: 0 auto;
}
img{
width: 800px;
height: 400px;
display: none;
}
#dote{
position: absolute;
bottom:40px;
left:350px;
}
#dote li{
list-style: none;
margin: 0 5px;
width: 15px;
height: 15px;
border-radius: 50%;
background-color: #dedede;
float: left;
}
#left{
position: absolute;
background-color: #333333