<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
div{
color: brown;
padding: 0px 30px;
font-family: 黑体;
line-height: 240px;
font-size: 100px;
box-sizing: border-box;
text-align: center;
border: 1px solid #000;
font-weight: 600;
margin-top: 50px;
}
div:hover{

transform: rotate(360deg);
transition: transform 1s linear;
}
</style>
</head>
<body>
<div style="width: 515px;height: 240px;">

</div>

<div style="width: 515px;height: 240px;">

</div>
</body>
</html>

运行结果:


css鼠标悬浮在元素上,元素旋转360度_html QQ截图20181030112935.png