-
Notifications
You must be signed in to change notification settings - Fork 1
/
plant.css
82 lines (69 loc) · 1.4 KB
/
plant.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
.plant-slide {
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 0;
}
.plant-slide:hover {
animation: skyrise 4s linear 5s forwards;
}
.plant-slide:hover .seedlings {
animation: grow 2s linear 15s forwards;
}
.plant-slide:hover .water {
animation: addWater 2s linear 10s forwards;
}
.plant-slide:hover .sun {
animation: sunrise 4s linear 2s forwards;
}
.plant-scene {
position: relative;
padding: 1em 0 0;
bottom: -90px;
}
.seedlings {
background: url('images/icon-seedling.svg');
width: 0;
height: 95px;
margin: 0 1em;
position: relative;
bottom: 60px;
}
.soil {
position: relative;
top: -89px;
left: -70px;
width: 120%;
height: 250px;
background: linear-gradient(#855406, #402A08);
}
.water {
width: 100%;
opacity: 0.8;
background: linear-gradient(#6acffe, cornflowerblue);
border-radius: 4px;
}
.sun {
position: relative;
width: 150px;
bottom: -180px;
left: 88%;
z-index: 0;
}
@keyframes grow {
from { width: 95px; }
to { width: calc(95px * 30); }
}
@keyframes addWater {
0% { height: 0; }
50% { height: 50%; }
100% { height: 0; }
}
@keyframes sunrise {
from { bottom: -180px; left: 88%; }
to { bottom: 200px; left: 40px; }
}
@keyframes skyrise {
from { background-color: transparent; }
to { background-color: cornflowerblue; }
}