先上图:看效果
再上代码如下:
一、目录结构
二、html+css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
.tab-content {
height: 42px;
perspective: 500px;
color: #fff;
font-family: Microsoft YaHei;
margin-top: 200px;
}
.check-result-site {
height: 100%;
transform-style: preserve-3d;
}
.check-result-site.animation-next {
transition: 0.6s;
transform: rotateX(-90deg);
}
.check-result-site.animation-prev {
transform: rotateX(90deg);
}
.check-result-item {
height: 100%;
border: 1px solid #3889DD;
background: rgba(0, 0, 0, 1);
box-sizing: border-box;
position: absolute;
display: flex;
justify-content: space-around;
align-items: center;
font-size: 1vw;
width: 100%;
}
.check-result-item.check-result-item-front {
top: 0;
transform: translate3d(0, 0, 21px);
-webkit-transform: translate3d(0, 0, 21px);
backface-visibility: hidden;
}
.check-result-item.check-result-item-next-back {
top: 0;
transform: rotateX(90deg) translate3d(0, 0, 21px);
-webkit-transform: rotateX(90deg) translate3d(0, 0, 21px);
backface-visibility: hidden;
}
.check-result-item.check-result-item-prev