效果如下图片
<!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>Document</title>
<style>
* {
padding: 0;
margin: 0;
}
li {
list-style: none;
}
.tb-promo {
position: relative;
width: 564px;
height: 315px;
margin: 100px auto;
}
.tb-promo img {
width: 564px;
height: 315px;
}
/*注意并集是用逗号分开的,*/
/*给了绝对定位后一定要家位置的left top这些,不然不起效,我也不知道为啥,如果去掉他就挨着父元素后面了。*/
.prev,
.next {
position: absolute;
top: 50%;
width: 21px;
height: 30px;
text-decoration: none;
color: white;
line-height: 30px;
text-align: center;
background-color: rgba(0, 0, 0, 0.3);
}
.prev {
left: 0;
border-radius: 0 15px 15px 0;
}
.next {
right: 0;
border-radius: 15px 0 0 15px;
}
.promo-nva {
position: absolute;
bottom: 10px;
left: 50%;
margin-left: -35px;
width: 70px;
height: 13px;
background-color: rgba(255, 255, 255, 0.3);
border-radius: 10px;
}
.promo-nva li {
float: left;
margin: 3px;
width: 8px;
height: 8px;
border-radius: 4px;
background-color: white;
}
/*权重要注意*/
.promo-nva .selectde {
background-color: orangered;
}
</style>
</head>
<body>
<div class="tb-promo">
<img src="images/图片2.png" alt="">
<a href="#" class="prev"><</a>
<a href="#" class="next">></a>
<!--小圆点-->
<ul class="promo-nva">
<li class="selectde"></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</div>
</body>
</html>