-
Notifications
You must be signed in to change notification settings - Fork 0
/
rotate3d.html
67 lines (64 loc) · 1.72 KB
/
rotate3d.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<!--
Created using JS Bin
http://jsbin.com
Copyright (c) 2015 by anonymous (http://jsbin.com/lefopigohe/2/edit)
Released under the MIT license: http://jsbin.mit-license.org
-->
<meta name="robots" content="noindex">
<html>
<head>
<meta charset="utf-8">
<title>rotate3d</title>
<style id="jsbin-css">
.wrapper{
position:relative;
width:300px;
height:109px;
left:50%;
top:300px;
margin-left:-150px;
perspective: 900px;
/* perspective-origin:50% 50%; */
}
.img-box{
position:relative;
transform-style: preserve-3d;
animation:spin 10s linear infinite;
width:100%;
height:100%;
/* transform-origin:50% 50%; */
}
img{
position:absolute;
width:300px;
}
img:nth-child(1) { transform: rotateY( 0deg ) translateZ(270px); }
img:nth-child(2) { transform: rotateY( 60deg ) translateZ(270px); }
img:nth-child(3) { transform: rotateY( 120deg ) translateZ(270px); }
img:nth-child(4) { transform: rotateY( 180deg ) translateZ(270px); }
img:nth-child(5) { transform: rotateY( 240deg ) translateZ(270px); }
img:nth-child(6) { transform: rotateY( 300deg ) translateZ(270px); }
@keyframes spin{
0%{
transform:rotateY(0deg);
}
100%{
transform:rotateY(360deg);
}
}
</style>
</head>
<body>
<div class="wrapper">
<div class="img-box">
<img src="http://i1.piimg.com/4851/7ec2661de75a62e9.gif" alt="">
<img src="http://i1.piimg.com/4851/7ec2661de75a62e9.gif" alt="">
<img src="http://i1.piimg.com/4851/7ec2661de75a62e9.gif" alt="">
<img src="http://i1.piimg.com/4851/7ec2661de75a62e9.gif" alt="">
<img src="http://i1.piimg.com/4851/7ec2661de75a62e9.gif" alt="">
<img src="http://i1.piimg.com/4851/7ec2661de75a62e9.gif" alt="">
</div>
</div>
</body>
</html>