继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

超简单-C3实现旋转六边形

凯文欧巴iii
关注TA
已关注
手记 13
粉丝 14
获赞 214
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>正六边形旋转</title>
        <style>
            *{
                margin: 0;
                padding: 0;
            }
            .kevin{
                width: 174px;
                height: 100px;
                margin: 50px auto;
                position: relative;
                transition: all 1s ease-in-out; 
            }
            .hexagon{
                width: 174px;
                height: 100px;
                background-color: rgba(0,0,0,0.4);
                position: relative;
                left: 0;
                top: 0;
            }
            .hexagon:before{
                content: "";
                display: block;
                width: 174px;
                height: 100px;
                background-color: rgba(0,0,0,0.4);
                transform: rotate(60deg);
                position: absolute;
                left: 0;
                top: 0;
            }
            .hexagon:after{
                content: "";
                display: block;
                width: 174px;
                height: 100px;
                background-color: rgba(0,0,0,0.4);
                transform: rotate(-60deg);
                position: absolute;
                left: 0;
                top: 0;
            }
            .kevin:hover{
                transform: rotate(360deg);
                transition: all .5s ease-in-out; 
            }
        </style>
    </head>
    <body>
        <div class="kevin">
            <div class="hexagon"></div>
        </div>
    </body>
</html>
打开App,阅读手记
2人推荐
发表评论
随时随地看视频慕课网APP