@keyframes beat{
0% {
transform: scale(1) rotate(-45deg);
}
20% {
transform: scale(1.25) rotate(-45deg);
}
40% {
transform: scale(1.5) rotate(-45deg);
}
}
.heart {
display: inline-block;
margin: 0 10px;
height: 50px;
width: 50px;
background-color: #ba0000;
transform: rotate(-45deg);
animation: beat 1s ease-in-out infinite;
&:before,
&:after {
content: "";
position: absolute;
height: 50px;
width: 50px;
border-radius: 50%;
background-color: #ba0000;
}
&:before {
top: -25px;
left: 0;
}
&:after {
top: 0;
left: 25px;
}
}