-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhearts.css
109 lines (99 loc) · 1.92 KB
/
hearts.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
/* Cursor heart styles */
.cursor-heart {
position: fixed;
pointer-events: none;
z-index: 9999;
font-size: 1.2rem;
transform-origin: center;
animation: cursorHeartAnim 1s ease-out forwards;
}
@keyframes cursorHeartAnim {
0% {
opacity: 1;
transform: translate(-50%, -50%) scale(0.3) rotate(0deg);
}
100% {
opacity: 0;
transform: translate(-50%, -150%) scale(1.5) rotate(45deg);
}
}
/* Background floating hearts */
.background-hearts {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
z-index: 0;
}
.floating-heart {
position: absolute;
opacity: 0.4;
animation: floatingHeartAnim 20s linear forwards;
}
@keyframes floatingHeartAnim {
0% {
opacity: 0;
transform: translateY(0) rotate(0deg);
}
10% {
opacity: 0.4;
}
90% {
opacity: 0.4;
}
100% {
opacity: 0;
transform: translateY(-100vh) rotate(360deg);
}
}
/* Hearts Animation */
.background-animation {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: -1;
background: var(--dark-bg);
overflow: hidden;
}
.heart {
position: absolute;
width: 20px;
height: 20px;
background: var(--primary-pink);
transform: rotate(45deg);
opacity: 0.2;
animation: floatHeart 4s ease-in infinite;
}
.heart::before,
.heart::after {
content: '';
width: 20px;
height: 20px;
background: var(--primary-pink);
border-radius: 50%;
position: absolute;
}
.heart::before {
left: -10px;
}
.heart::after {
top: -10px;
}
@keyframes floatHeart {
0% {
transform: rotate(45deg) translateY(0) scale(0.3);
opacity: 0;
}
50% {
opacity: 0.3;
}
100% {
transform: rotate(45deg) translateY(-1000px) scale(1);
opacity: 0;
}
}