JSFiddle - React, Tailwind, and code Playground
HTML
<div id="ropes"></div>
CSS
#ropes
{
width: 10px;
height: 300px;
background-color: brown;
position: absolute;
left: 100px;
-webkit-transform-origin: center 0;
-webkit-animation-name: wackeln;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: ease-in-out;
-moz-transform-origin: center 0;
-moz-animation-name: wackeln;
-moz-animation-duration: 2s;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: ease-in-out;
transform-origin: center 0;
animation-name: wackeln;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
}
@-webkit-keyframes wackeln {
0% {
-webkit-transform: rotate(-20deg);
}
50% {
-webkit-transform: rotate(20deg);
}
100% {
-webkit-transform: rotate(-20deg);
}
}
@-moz-keyframes wackeln {
0% {
-moz-transform: rotate(-20deg);
}
50% {
-moz-transform: rotate(20deg);
}
100% {
-moz-transform: rotate(-20deg);
}
}
@keyframes wackeln {
0% {
transform: rotate(-20deg);
}
50% {
transform: rotate(20deg);
}
100% {
transform: rotate(-20deg);
}
}