<div class="center">
<i class="fa fa-heart heart" aria-hidden="true"></i>
</div>
body {
height: 100vh;
overflow: hidden;
}
.center {
display: flex;
justify-content: space-evenly;
align-items: center;
height: 100vh;
}
.heart {
color: red;
font-size: 50px;
animation: heart-pulse 1s infinite ease-out;
}
@keyframes heart-pulse {
0% {
transform: scale(0);
color:blue;
}
30% {
transform: scale(2);
color:green;
}
50% {
transform: scale(1.2);
color:red;
}
70% {
transform: scale(0.65);
color:green;
}
100% {
transform: scale(0);
color: red;
}
}
This Pen doesn't use any external JavaScript resources.