<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
perspective: 500px;
}
.box {
position: relative;
width: 500px;
height: 500px;
margin: 100px auto;
transform-style: preserve-3d; /*让子元素保持3d立体空间*/
background: url('../屏幕截图(100).png') no-repeat;
transition: all 4s;
}
.box:hover{
transform: rotateY(360deg);
}
.box div {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('../屏幕截图(19).png');
background-position: -150px -150px;
transition: all 4s;
}
.box div:hover {
transform: rotateX(180deg);
}
</style>
</head>
<body>
<div class="box">
<div>
</div>
</div>
</body>
</html>