前言
学动画的时候看到的,很有意思,有兴趣可以看全文
完整代码
<!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>3D 盒子旋转</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
perspective: 1200px;
background: black;
}
#box {
transform-style: preserve-3d;
margin: 180px auto;
margin-bottom: 0;
width: 200px;
height: 200px;
positi