Html
    Css
    Js
            * {
	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;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

简易js轮播图(带注释简单易懂)

更新时间:2020-07-28 11:15:09

javascript备注写的很详细,仔细看然后理清逻辑很快就可以学会了。

0