-
Notifications
You must be signed in to change notification settings - Fork 0
/
style-heart.css
119 lines (107 loc) · 2.84 KB
/
style-heart.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
/* background */
.base {
height: 100%;
width: 100%;
top: 0;
left: 0;
margin: 0;
padding: 0;
position: absolute;
background: black;
animation-name: bg;
animation-duration: 1.5s;
animation-iteration-count: infinite;
}
/* rhombus */
.heart {
height: var(--heart-size);
width: var(--heart-size);
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
position: absolute;
background-color: red;
transform: rotate(-45deg);
animation-name: beat-size;
animation-duration: 1.5s;
animation-iteration-count: infinite;
}
/* semi-circle left */
.heart::before {
content: "";
height: var(--heart-size);
width: var(--heart-size);
top: var(--heart-before-top);
left: 0px;
position: absolute;
border-radius: 50%;
background-color: red;
animation-name: beat-color;
animation-duration: 1.5s;
animation-iteration-count: infinite;
}
/* semi-circle right */
.heart::after {
content: "";
height: var(--heart-size);
width: var(--heart-size);
top: 0px;
left: var(--heart-after-left);
position: absolute;
border-radius: 50%;
background-color: red;
animation-name: beat-color;
animation-duration: 1.5s;
animation-iteration-count: infinite;
}
.text {
font-family: monospace;
font-size: var(--text-size, 70px);
color: black;
margin: auto;
position: absolute;
}
#up-right { right:0; }
#bottom-left { bottom: 0; }
#dag {
animation-name: emerge;
animation-duration: 1.1s;
animation-iteration-count: infinite;
}
#dig {
animation-name: emerge;
animation-duration: 1.3s;
animation-iteration-count: infinite;
}
#dug {
animation-name: emerge;
animation-duration: 1.6s;
animation-iteration-count: infinite;
}
@keyframes bg {
10% { background: radial-gradient(circle at center, red, black 5%); }
20% { background: radial-gradient(circle at center, red, black 20%); }
30% { background: radial-gradient(circle at center, red, black 30%); }
40% { background: radial-gradient(circle at center, red, black 40%); }
50% { background: radial-gradient(circle at center, red, black 50%); }
60% { background: radial-gradient(circle at center, red, black 40%); }
70% { background: radial-gradient(circle at center, red, black 30%); }
80% { background: radial-gradient(circle at center, red, black 20%); }
90% { background: radial-gradient(circle at center, red, black 5%); }
}
@keyframes beat-size {
0% { transform: scale(1) rotate(-45deg); }
50% { transform: scale(0.6) rotate(-45deg); }
100% { background-color: black; }
}
@keyframes beat-color {
100% { background-color: black; }
}
@keyframes emerge {
50% {
font-size: 50px;
color: red;
}
}