<div class="ball"></div>
.ball {
border-radius: 50%;
width: 200px;
height: 200px;
border: 2px solid #000;
animation-name: grow;
animation-duration: 2s;
animation-timing-function: ease-out;
animation-delay: 0;
animation-direction: alternate;
animation-iteration-count: infinite;
animation-fill-mode: none;
animation-play-state: running;
}
@keyframes grow {
0% {
transform: scale(.5);
background-color: yellow;
border-radius: 100%;
}
50% {
background-color: purple;
}
100% {
transform: scale(1.5);
background-color: pink;
}
}
body,
html {
height: 100%;
}
body {
display: flex;
justify-content: center;
margin-top: 150px;
background-color: #D2F8D2;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.