heart animations
This commit is contained in:
1 parent
26a2a9fb69
commit
d0fa48198f
2 files changed
+73
-9
No files matched your search
@@ -5,15 +5,20 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.heart {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background-color: red;
|
||||
transform-origin: center center;
|
||||
will-change: transform;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.error-popup {
|
||||
z-index: 6;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@@ -37,4 +42,42 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@keyframes heartBeatFast {
|
||||
0%, 100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
15% {
|
||||
transform: scale(1.15);
|
||||
}
|
||||
30% {
|
||||
transform: scale(1);
|
||||
}
|
||||
45% {
|
||||
transform: scale(1.18);
|
||||
}
|
||||
60% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes heartBeatSlow {
|
||||
0%, 100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
25% {
|
||||
transform: scale(1.08);
|
||||
}
|
||||
50% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.heart-fast {
|
||||
animation: heartBeatFast 0.8s infinite ease-in-out;
|
||||
}
|
||||
|
||||
.heart-slow {
|
||||
animation: heartBeatSlow 2s infinite ease-in-out;
|
||||
}
|
||||
Reference in new issue
Block a user