淘宝轮播图——nav中⼩圆点li的做法<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>轮播图</title>
<style>
* {
margin: 0;
padding: 0;
}
.box {
position: relative;
width: 520px;
height: 280px;
margin: 100px auto;
}
.box img {
width: 100%;
height: 100%;
}
.
box a {
position: absolute;
top: 50%;
margin-top: -15px;
width: 20px;
height: 30px;
background-color: rgba(0, 0, 0, .7);
color: #fff;
/* 下⾯两个忘了 */
text-align: center;
line-height: 30px;
text-decoration: none;
}
.box .prev {
left: 0;
border-radius: 0 15px 15px 0;
}
.box .next {
right: 0;
border-radius: 15px 0 0 15px;
}
.box ul {
position: absolute;
bottom: 10px;
left: 50%;
margin-left: -35px;
width: 70px;
height: 13px;
border-radius: 6px;
background-color: rgba(255, 255, 255, .3);
}
li {
list-style: none;
float: left;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: white;
margin-left: 4px;
margin-top: 2px;
}
.nav .selected {
background-color: orange;
}
</style>
</head>
<body>
<div class="box">
<img src="tb.jpg" alt="">borderbox
<a href="#" class="prev"><</a>
<a href="#" class="next">></a>
<ul class="nav">
<li class="selected"></li>
<li></li>
<li></li>
<li></li>
<li></li>            <li></li>        </ul>
</div>
</body>
</html>

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。