<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>自动切换</title>
<style type="text/css">
.show{
width: 400px;
height: 400px;
overflow: hidden;
}
.wp{
width: 99999999999999999999999px;
height: 400px;
text-align: center;
line-height: 400px;
/*1em=816x*/
font-size: 3em;
overflow: hidden;
position: relative;
left: 0;
transition:all 0.3s;
}
.wp div{
width: 400px;
height: 400px;
text-align: center;
float: left;
line-height: 400px;
transition:all 1s;
}
/*:nth-child(n) 选择器匹配属于其父元素的第 N 个子元素,不论元素的类型。*/
.wp div:nth-child(1){
background: red;
}
.wp div:nth-child(2){
background: green;
}
.wp div:nth-child(3){
background: yellow;
}
.wp div:nth-child(4){
background: blue;
}
.btn{
轮番图之自动切换+按钮点击+箭头点击
最新推荐文章于 2023-11-16 18:50:49 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)