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 282 views
1 answer 346 views
1 answer 242 views
1 answer 304 views
2 answers 303 views
2 answers 276 views
...