-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanimationscss.css
141 lines (139 loc) · 2.84 KB
/
animationscss.css
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/*@keyframes changeShape{
from{
border-radius: 0%;
}
10%{
for stages in animation
}
to{
border-radius: 50%;
}
}*/
/*@keyframes bounce{
from{
transform: translateY(0px);
}
25%{
transform: translateY(-100px);
}
50%{
transform: translateY(0px);
}
75%{
transform: translateY(-50px);
}
to{
transform: translateY(0px);
}
}*/
@keyframes swirl1{
from{
border-radius: 0%;
}
to{
border-radius: 50%;
}
}
@keyframes swirl2{
from{
transform: rotate(0deg);
}
to{
transform: rotate(360deg);
}
}
@keyframes swirl3{
from{
/*transform: translateX(500px);*/
height: 200px;
width: 200px;
}
to{
/*transform: translateX(0px);*/
height: 100px;
width: 100px;
}
}
@keyframes revolving{
from{
transform: rotateX(90deg) rotateY(90deg);
}
to{
transform: rotateX(-90deg) rotateY(-90deg);
}
}
#div1{
width: 100px;
height: 100px;
background-color: black;
margin: 100px;
/*border-radius: 50%;*/
/*transform: scale(2);*/
/*transform: rotate(45deg);*/
/*can also use rotateX, rotateY to rotate in specific direction, can also use scaleX scaleY*/
/*transform: translate(100px,100px);*/
/*translateX and Y can also be used*/
/*transform: skew(10deg);*/
/*to use more than one transform property */
/*transform: translate(100px,100px) rotate(180deg);*/
transition: 2s ease-in-out ;
/*ease-in,ease-out,linear,ease-in-out*/
/*if I want the transition in one property only-*/
/*transition: height 1s ease-in-out;*/
/*if I want a delay in transition*/
/*transition: 1s ease-in-out 0.5s;*/
/*for timing function*/
/*transition: 1s steps(4,end);*/
/*animation: changeShape 1s ease-in-out 2 alternate;*/
/*animation: bounce 1s ease-in-out 10;*/
animation-name: swirl1,swirl2,swirl3;
animation-duration: 1s,1s,1s;
animation-direction: alternate;
animation-iteration-count: infinite,infinite,infinite;
}
#div1:hover{
/*height: 100px;
width: 100px;*/
/*border-radius: 50%;*/
}
.cube{
height: 200px;
width: 200px;
position: relative;
margin: 200px;
transform-style:preserve-3d ;
perspective: 10000000px;
transition: 1s ease-in-out;
/*transform-style: preserve-3d;*/
animation: revolving 2s ease-in-out infinite alternate;
}
.face{
height: 100%;
width: 100%;
position: absolute;
top: 20%;
left: 20%;
transition: all 1s;
}
.one{
background-color: blue;
}
.two{
background-color: grey;
transform: rotateY(90deg) translateZ(-100px) translateX(100px);
}
.three{
background-color: yellow;
transform: rotateY(90deg) translateZ(100px) translateX(100px);
}
.four{
background-color: pink;
transform: rotateX(90deg) translateZ(100px) translateY(-100px);
}
.five{
background-color: chocolate;
transform: rotateX(90deg) translateZ(-100px) translateY(-100px);
}
.six{
background-color: black;
}