<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
*{
padding: 0;
margin:0;
}
html,body
{
color:aliceblue;
font-size: 150px;
text-align: center;
line-height: 400px;
}
.text{
width:400px;
height:400px;
position:relative;
margin:200px;
transform: perspective(800px);
transform-style: preserve-3d;
transition: transform 3s ease 0s;
}
.text:hover{
transform: rotate3d(1,1,1,180deg);
}
.text .mace{
width:400px;
height:400px;
background:url(2.jpg) no-repeat ;
opacity: 0.5;
position:absolute;
left:0;
top:0;
}
.mace:nth-child(1){
transform:translateZ(-200px);
}
.mace:nth-child(2){
transform:translateZ(200px);
}
.mace:nth-child(3){
transform:translateX(-200px) rotateY(90deg);
}
.mace:nth-child(4){
transform:translateX(200px) rotateY(90deg);
}
.mace:nth-child(5){
transform:translateY(-200px) rotateX(90deg);
}
.mace:nth-child(6){
transform:translateY(200px) rotateX(90deg);
}
</style>
</head>
<body>
<div class="text">
<div class="mace">1</div>
<div class="mace">2</div>
<div class="mace">3</div>
<div class="mace">4</div>
<div class="mace">5</div>
<div class="mace">6</div>
</div>
</body>
</html>
易小侠
- 粉丝: 6624
- 资源: 9万+