forked from jgthms/lavalamp.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lavalamp.css
90 lines (80 loc) · 3.6 KB
/
lavalamp.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
body{ background: #f2f2f2; background-image: linear-gradient(#fff 0%, #f2f2f2 100%); color: #4d4d4d; font-family: Arial, Verdana, sans-serif; font-size: 16px; line-height: 1.25; overflow: hidden;}
ol{ list-style: outside decimal; margin-left: 40px;}
li{ background: #fff; border-bottom: 1px solid #e0e0e0; padding: 20px;}
li:nth-child(2n){ background: #fafafa;}
.button,
#lavalamp{ background: #1A1A1A; border: none; color: white; display: block; font-size: 10px; font-weight: bold; height: 60px; letter-spacing: 0.2em; line-height: 1; padding: 25px 20px; position: relative; text-align: center; text-transform: uppercase; vertical-align: top;}
#lavalamp{ display: none; height: auto; left: 0; line-height: 20px; min-height: 60px; overflow: hidden; padding: 20px; position: fixed; text-align: center; width: 100%; z-index: 9001;}
#lavalamp span{ display: block; left: 0; line-height: 20px; margin-top: -10px; position: absolute; top: 50%; width: 100%;}
#lavalamp:before,
#lavalamp:after{ border: 1px solid white; border-radius: 50%; content: ''; display: none; height: 160px; left: 50%; margin: -80px 0 0 -80px; position: absolute; top: 50%; transition: all 250ms ease-out; width: 160px;}
.up-start#lavalamp,
.up-end#lavalamp,
.down-start#lavalamp,
.down-end#lavalamp{ animation: up-start 1000ms 1 cubic-bezier(0, 1, 0, 1) both; display: block;}
.up-end#lavalamp{ animation-name: up-end; animation-duration: 500ms;}
.down-start#lavalamp{ animation-name: down-start;}
.down-end#lavalamp{ animation-name: down-end; animation-duration: 500ms;}
@keyframes up-start {
0% { bottom: 0; height: 60px;}
100% { bottom: 0; height: 100%;}
}
@keyframes up-end {
0% { bottom: auto; height: 100%; top: 0;}
100% { bottom: auto; height: 60px; top: 0;}
}
@keyframes down-start {
0% { height: 60px; top: 0;}
100% { height: 100%; top: 0;}
}
@keyframes down-end {
0% { bottom: 0; height: 100%; top: auto;}
100% { bottom: 0; height: 60px; top: auto;}
}
.up-start#lavalamp:before,
.up-start#lavalamp:after,
.down-start#lavalamp:before,
.down-start#lavalamp:after{ animation: pulse 2000ms infinite ease-out both; display: block;}
.up-start#lavalamp:after,
.down-start-start#lavalamp:after{ animation-delay: 500ms;}
@keyframes pulse {
0% { opacity: 0; transform: scale(0.1, 0.1);}
30% { opacity: 0.5;}
70% { opacity: 0; transform: scale(1, 1);}
100% { opacity: 0;}
}
.up-start#lavalamp,
.up-end#lavalamp,
.down-start#lavalamp,
.down-end#lavalamp{ -webkit-animation: up-start 1000ms 1 cubic-bezier(0, 1, 0, 1) both; display: block;}
.up-end#lavalamp{ -webkit-animation-name: up-end; -webkit-animation-duration: 500ms;}
.down-start#lavalamp{ -webkit-animation-name: down-start;}
.down-end#lavalamp{ -webkit-animation-name: down-end; -webkit-animation-duration: 500ms;}
@-webkit-keyframes up-start {
0% { bottom: 0; height: 60px;}
100% { bottom: 0; height: 100%;}
}
@-webkit-keyframes up-end {
0% { bottom: auto; height: 100%; top: 0;}
100% { bottom: auto; height: 60px; top: 0;}
}
@-webkit-keyframes down-start {
0% { height: 60px; top: 0;}
100% { height: 100%; top: 0;}
}
@-webkit-keyframes down-end {
0% { bottom: 0; height: 100%; top: auto;}
100% { bottom: 0; height: 60px; top: auto;}
}
.up-start#lavalamp:before,
.up-start#lavalamp:after,
.down-start#lavalamp:before,
.down-start#lavalamp:after{ -webkit-animation: pulse 2000ms infinite ease-out both; display: block;}
.up-start#lavalamp:after,
.down-start-start#lavalamp:after{ -webkit-animation-delay: 500ms;}
@-webkit-keyframes pulse {
0% { opacity: 0; -webkit-transform: scale(0.1, 0.1);}
30% { opacity: 0.5;}
70% { opacity: 0; -webkit-transform: scale(1, 1);}
100% { opacity: 0;}
}