<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<style>
ul {
margin: 100px;
}
ul li {
width: 120px;
height: 35px;
perspective:350px;
}
.box {
width: 100%;
height: 100%;
position: relative;
transform-style: preserve-3d;
transition: all .3s;
}
.box:hover {
transform: rotateX(90deg);
}
.front,.bottom {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.front {
background: pink;
transform: translateZ(17.5px);
}
.bottom {
background: purple;
transform: translateY(17.5px) rotateX(-90deg);
}
</style>
</head>
<body>
<ul>
<li>
<div class="box">
<div class="front"></div>
<div class="bottom"></div>
</div>
</li>
</ul>
</body>
</html>
记录3d动画-翻转
最新推荐文章于 2024-08-08 10:22:12 发布