transform: rotate(10deg);
正值是顺时针
负值是逆时针
transformX: rotate(10deg);绕x轴旋转
transformY: rotate(10deg);绕y轴旋转
绕x,y轴旋转,一般用于3D效果
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>div{width: 200px;height: 500px;transition: all 2s;border: 1px solid red;margin: 100px auto;transform: rotate(60deg);}</style>
</head>
<body><div></div>
</body>
</html>
旋转60度