<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>轮播图</title>
<style>
* {
margin: 0;
padding: 0;
}
ul, ol, li {
list-style: none;
}
img {
width: 100%;
height: 100%;
display: block;
}
.banner {
width: 100%;
height: 400px;
position: relative;
margin: 10px 0;
}
.banner > ul {
width: 100%;
height: 100%;
position: relative;
}
.banner > ul > li {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
}
.banner > ul > li.active{
opacity: 1;
}
.banner > ol {
width: 160px;
JavaScript案例(五):轮播图;html+css+js实现轮播图功能以及自动切换图片
最新推荐文章于 2024-05-13 15:54:57 发布