<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <style> div{ overflow:hidden; width:200px; height:200px; border:1px solid hotpink; margin:10px; float:left; } div::before{ content:"心愿"; display:block; width:100%; height:100%; background-color: hotpink; transform:rotate(180deg); transform-origin:left bottom; transition:all 0.25s; } div:hover::before{ transform:rotate(0deg); } </style> <body> <div></div> <div></div> <div></div> </body> </html>
旋转中心点案例
![](https://img-home.csdnimg.cn/images/20240711042549.png)