主要功能:
- 图片可进行左右切换
- 自动轮播效果实现
- 展示图片下方图片列表切换
- 小圆点可随着图片变换同步展示
运行图:
![tu1](https://i-blog.csdnimg.cn/blog_migrate/ec37a83f4f5f89f5f9a4133e76c19061.png#pic_center)
源代码参考:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="./font_uq7xe091nz/iconfont.css">
<style>
* {
margin: 0px;
padding: 0px;
}
a {
text-decoration: none;
}
.container {
width: 1500px;
height: 900px;
margin-left: 140px;
margin-top: 30px;
display: flex;
flex-wrap: wrap;
flex-direction: row;
justify-content: center;
align-items: center;
}
#did {
display: flex;
height: 500px;
margin-left: 73px;
position: relative;
}
#list {
display: flex;
width: 1000px;
height: 120px;
margin-top: -80px;
padding-left: 100px;
}
#mid {
width: 887px;
height: 560px;
}
#list img {
width: 120px;
border: 1px solid #fff;
margin-left: 3px;
}
#list img:hover {
border: 2px solid red;
}
#buttons {
position: absolute;
height: 10px;
width: 220px;