How to set the image to rotate continuously in css: You can set it by using the animation attribute and transform attribute, such as [-webkit-transform: rotate(360deg); animation: rotation;].
The operating environment of this tutorial: Windows 10 system, CSS3 version. This method is suitable for all brands of computers.
(Learning video sharing:css video tutorial)
How to set the image to rotate continuously in css:
Related attributes :
animation animation attribute
animation: name duration timing-function delay iteration-count direction fill-mode play-state;
Attribute value:
animation-name Specifies the name of the keyframe to be bound to the selector
animation-duration Specifies how many seconds or milliseconds the animation takes to complete
transform: none|transform-functions;
.demo{ text-align: center; margin-top: 100px; } @-webkit-keyframes rotation{ from {-webkit-transform: rotate(0deg);} to {-webkit-transform: rotate(360deg);} } .an{ -webkit-transform: rotate(360deg); animation: rotation 3s linear infinite; -moz-animation: rotation 3s linear infinite; -webkit-animation: rotation 3s linear infinite; -o-animation: rotation 3s linear infinite; } .img{border-radius: 250px;}
The above is the detailed content of How to set the image to rotate in css. For more information, please follow other related articles on the PHP Chinese website!