<div></div>
div {
background: #2db34a;
border-radius: 50%;
height: 50px;
position: absolute;
width: 50px;
animation: shake .5s ease-in-out infinite;
}
@keyframes shake {
0% {
transform: translateX(0);
}
20% {
transform: translateX(-10px);
}
40% {
transform: translateX(10px);
}
60% {
transform: translateX(-10px);
}
80% {
transform: translateX(10px);
}
100% {
transform: translateX(0);
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.