* {
margin:0;
padding:0;
}
ul {
list-style:none;
}
.wrap {
width:500px;
height:300px;
margin:100px auto;
position:relative;
}
.wrap:hover .btn {
display:block;
}
.list {
width:100%;
height:100%;
position:relative;
}
.item {
position:absolute;
transition:all .8s;
opacity:0;
}
.item.active {
z-index:100;
opacity:1;
}
.btn {
width:30px;
height:60px;
font-size:30px;
opacity:.5;
border:none;
position:absolute;
top:120px;
z-index:1000;
cursor:pointer;
display:none;
}
#right {
right:0;
}
#left {
left:0;
}
.pointList {
position:absolute;
right:20px;
bottom:20px;
z-index:10000;
}
.point {
width:8px;
height:8px;
background-color:#969595;
border:1px solid #000000;
float:left;
margin-right:8px;
border-radius:100%;
cursor:pointer;
}
.point.active {
background-color:white;
}
更新时间:2020-07-28 11:15:09
javascript备注写的很详细,仔细看然后理清逻辑很快就可以学会了。