先看效果
css 3d 翻转效果
代码
<!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>CSS 3D翻转特效兼容 IE</title>
<style>
.content {
width: 200px;
height: 200px;
color: transparent;
font-size: 30px;
cursor: pointer;
text-align: center;
line-height: 200px;
margin: 50px;
position: relative;
}
.child {
position: absolute;
top: 0px;
left: 0px;
bottom: 0px;
right: 0px;
line-height: 200px;
transform-origin: 50% 50% -100px;
transition: 0.3s;
}
.child01 {
display: block;
color: #059dd9;
border: 1px solid #10adf2;
}
.child02 {
color: white;
background: #10adf2;
transform: rotateY(90deg);
}
.content:hover .child01 {
transform: rotateY(-90deg);
}
.content:hover .child02 {
transform: rotateY(0);
}
</style>
</head>
<body>
<div class="content">
<div class="child child01">3D立体翻转</div>
<div class="child child02">3D翻转22</div>
</div>
</body>
</html>
发表评论: