JSFiddle - React, Tailwind, and code Playground
by Nicolas PUJOL
HTML
<div class="pacman">
<div class="pacman-top"></div>
<div class="pacman-bottom"> LION</div>
</div>
CSS
.pacman {
margin: 40px 10px;
}
.pacman-top {
background-color: yellow;
height: 100px;
width: 200px;
content:"11";
border-radius: 100px 100px 0 0;
animation: spin1 0.5s infinite linear;
}
.pacman-bottom {
background-color: yellow;
height: 100px;
width: 200px;
border-radius: 0 0 100px 100px;
animation: spin2 0.5s infinite linear;
}
/* Animation*/
@keyframes spin1 {
0% {
transform: rotate(0deg);
}
50% {
transform: rotate(-35deg);
}
}
@keyframes spin2 {
0% {
transform: rotate(0deg);
}
50% {
transform: rotate(35deg);
}
}