下面是我的代码,如果有小伙伴想去试试,一定要记得图片的路径问题。必须要把路径弄好。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>轮播图</title>
</head>
<style>
*{
margin: 0;
padding:0;
}
.box{
width: 672px;
height: 320px;
border: 1px solid red;
margin: 100px auto;
position: relative;
}
.box img{
width: 672px;
height: 320px;
}
ul{
list-style: none;
}
.imglist ul li{
width: 672px;
height: 320px;
position: absolute;
top:0;
left:0;
display: none;
}
.btn span{
width: 50px;
height: 50px;