共计 350 个字符,预计需要花费 1 分钟才能阅读完成。
div {
width: 200px;
height: 200px;
background-color: pink;
margin: 100px auto;
transition: all 1s;
/* 可以跟方位名词 */
/* transform-origin: left bottom; */
/* 默认的是 50% 50% 等价于 center center */
/* 可以是 px 像素 */
transform-origin: 50px 50px;
}
div:hover {
transform: rotate(360deg);
}
原文地址: css3- 旋转中心点案例
正文完