You're tasked with creating a spinner loader animation that rotates 360 degrees indefinitely. How would you define this in the @keyframes rule?

  • @keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
  • @keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
  • @keyframes rotate { 0% { transform: rotate(0deg); } 360% { transform: rotate(360deg); } }
  • @keyframes rotate { from { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
To create a spinner loader animation that rotates 360 degrees indefinitely, you would define it using the @keyframes rule. The correct definition uses Option 2: @keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }. This specifies a continuous rotation animation starting from 0 degrees and ending at 360 degrees, creating an infinite spinning effect.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *