美文网首页
css鼠标悬浮在元素上,元素旋转360度

css鼠标悬浮在元素上,元素旋转360度

作者: 泪滴在琴上 | 来源:发表于2018-10-30 11:30 被阅读14次
<!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>

运行结果:


QQ截图20181030112935.png

相关文章

网友评论

      本文标题:css鼠标悬浮在元素上,元素旋转360度

      本文链接:https://www.haomeiwen.com/subject/zvtgtqtx.html