We can create animation effects through css. What I will demonstrate below is the rotation of p and the animation of color transition
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8" /> <title></title> <style> a{ text-align:center; line-height:100px; transition:all 2s; width:100px; height:100px; background:pink; float:left; border-radius:50%; } a:hover{ transition:all 2s; background:red; transform-origin:50 100; transform:rotate(360deg); border-radius:50%; } </style> </head> <body> <h1>请将鼠标移动到下面的矩形上:</h1> <a> 两秒旋转360 </a> </body> </html>
The effect is tested by myself, it is very gorgeous oh!
The above article about the simple implementation of css rotation animation effect is all the content shared by the editor. I hope it can give you a reference, and I also hope that everyone will support the PHP Chinese website.
For more simple implementation examples of css rotation animation effects, please pay attention to the PHP Chinese website for related articles!