JSFiddle - React, Tailwind, and code Playground
by Brett Gaynor
HTML
<div class="container">
<div class="holder-50">
<div class="square one"></div>
</div>
<div class="holder-50">
<div class="square two"></div>
</div>
</div>
CSS
.container {
width: 100%;
display: flex;
}
.holder-50 {
max-width 50%;
}
.square {
width: 350px;
height: 350px;
margin: 200px auto;
background: #41A9F0;
}
.one {
animation: box 5s linear infinite;
}
.two {
animation: boxNoBg 5s linear infinite;
}
@keyframes box {
0% {
transform: scale(0.2) rotate(0deg);
border-radius: 0;
}
50% {
transform: scale(2) rotate(180deg);
border-radius: 50%;
background:#5ABE8A;
}
100% {
transform: scale(0.2) rotate(360deg);
}
}
@keyframes boxNoBg {
0% {
transform: scale(0.2) rotate(0deg);
border-radius: 0;
}
50% {
transform: scale(2) rotate(180deg);
border-radius: 50%;
/* background:#5ABE8A; */
}
100% {
transform: scale(0.2) rotate(360deg);
}
}