3d旋转相册
效果图:
代码如下:
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>girlfriend</title>
<style>
body
{
margin:0;
background:#000;
}
#wrap
{
width:300px;
height:400px;
position: relative;
margin: 300px auto;
-webkit-perspective:3000px;
-moz-perspective:3000px;
-ms-transform:perspective(3000px);
-ms-perspective:3000px;
}
#head
{
width:100%;
height:100%;
position: absolute;
-webkit-transform-style: preserve-3d;
-webkit-animation:donghua 15s linear 0s infinite;
-moz-transform-style: preserve-3d;
-moz-animation:donghua 15s linear 0s infinite;
-ms-transform-style: preserve-3d;
-ms-animation:donghua 25s linear 0s infinite;
}
#head div
{
position: absolute;
top:0;
left:0;
width:300px;
height:400px;
border:1px solid #000
text-align: center;
line-height:100px;
}
#head div:nth-child(1)
{
-webkit-transform:rotateY(0deg) translateZ(400px)