-
Notifications
You must be signed in to change notification settings - Fork 0
/
css-animation.css
34 lines (31 loc) · 804 Bytes
/
css-animation.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
#stage {
border: 1em solid;
border-color: #D2AB6F #D2AB6F #8C6529 #8C6529;
}
#felt {
position: relative;
margin: 0 0 0 200px;
height: 500px;
background: green;
background-image: repeating-linear-gradient(to top left, rgba(255,255,255,0), rgba(255,255,255,0) 80px, rgba(255,255,255,0.2) 80px, rgba(255,255,255,0.2) 150px);
box-shadow: inset 0 0 10px rgba(0,0,0,0.4);
}
#felt div {
position: absolute;
left: -140px;
top: 100px;
z-index: 0;
transition-property: left, top, -webkit-transform;
transition-timing-function: ease-out, ease-out, ease-in-out;
transition-duration: 0.5s;
}
#felt div:nth-child(odd) {
margin-top: 1px;
margin-left: 2px;
transform: rotate(1deg);
}
#felt div:nth-child(3n) {
margin-top: -2px;
margin-left: -1px;
transform: rotate(-1deg);
}