<!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>3D旋转</title>
<style>
body {
perspective: 10vmin;
}
.box{
margin: 0 auto;
width: 500px;
height: 500px;
border-radius: 50%;
background: url('https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=2510266054,845468012&fm=26&gp=0.jpg');
animation: scale-rotate 10s alternate;
}
@keyframes scale-rotate {
0%, 100% {
transform: translateZ(0) rotate(0);
opacity: 0;
}
10% {
opacity: 1;
}
95% {
transform: translateZ(10vmin) rotateZ(360deg);
}
}
</style>
</head>
<body>
<div class="box"></div>
</body>
</html>
3D放大旋转
最新推荐文章于 2022-12-23 21:08:33 发布