How to rotate an HTML image continuously in CSS

1 Answer

0 votes
<img class="rotate" 
src="https://images.freeimages.com/images/large-previews/5b7/on-the-road-7-1384791.jpg" 
/>
.rotate {
   width: 300px;
   height: 300px;
   animation: rotation infinite 3s linear;
}


@keyframes rotation {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

 



answered Jun 14, 2021 by avibootz

Related questions

2 answers 302 views
1 answer 359 views
1 answer 257 views
1 answer 328 views
2 answers 326 views
2 answers 295 views
...