3D转换 百度钱包
难点
代码
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap</title>
<meta charset="utf-8">
<mata http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!--[if lt IE 9]>
<script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
#content {
width: 200px;
height: 300px;
margin: 100px auto;
position: relative;
}
#face,#face2 {
width: 300px;
height: 300px;
background: url(src/images/light-aio_2296245.png) no-repeat left bottom;
position: absolute;
top: 0;
left:0;
transition: all 1s;
backface-visibility: hidden; /*转过去以后隐藏*/
}
#face {
z-index: -1;
}
#face2 {
background-position: -305px bottom; /* spirits技术 */
transform: rotateY(-180deg);
}
#content:hover #face{
transform: rotateY(-180deg);
}
#content:hover #face2{
transform: rotateY(0deg);
}
</style>
</head>
<body style="padding:50px;background-color:#f14849">
<div id="content">
<div id="face"></div>
<div id="face2"></div>
</div>
</body>
</html>
<!-- <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script> -->
<script src="bootstrap/js/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
网友评论