forked from Shubham56-droid/Web-Components-Projects
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathROTATION.css
More file actions
98 lines (72 loc) · 1.28 KB
/
ROTATION.css
File metadata and controls
98 lines (72 loc) · 1.28 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
body
{
padding:0;
margin:0;
background: #607d8b;
}
.box
{
position:absolute;
top: calc(50% - 150px);
left: calc(50% - 100px);
transform: perspective(1000px) rotateY(-45deg);
width: 200px;
height:300px;
transform-style: preserve-3d;
}
.box div
{
position: absolute;
top:0;
left: 0;
width:100%;
height:100%;
transform-style: preserve-3d;
animation: animate 5s linear infinite;
}
.box div span
{
position:absolute;
top:0;
left:0;
display: block;
width:100%;
height: 100%;
background: linear-gradient(0deg,#f1f1f1, #bbb,#f1f1f1);
border-radius: 20px;
}
.box div span:nth-child(1)
{
transform: rotateX(0deg);
}
.box div span:nth-child(2)
{
transform: rotateX(45deg);
}
.box div span:nth-child(3)
{
transform: rotateX(-45deg);
}
.box div span:nth-child(4)
{
transform: rotateX(90deg);
}
@keyframes animate
{
0%
{
transform: perspective(1000px) rotateX(0deg);
}
25%
{
transform: perspective(1000px) rotateY(180deg);
}
50%
{
transform: perspective(1000px) rotateX(90deg);
}
100%
{
transform: perspective(1000px) rotateX(180deg);
}
}