首页 > Web开发 > 详细

html跳动的心实现代码

时间:2019-03-25 23:32:48      阅读:563      评论:0      收藏:0      [点我收藏+]
<style>
        .box{
            width: 200px;
            height: 400px;
            position: relative;
            margin: 30px auto;
            transform: all 0.5s;

        }
        @keyframes moves{
            from{box-shadow: 0 0 0 transparent;}
            30%{box-shadow: 0 0 50px rgb(236, 57, 57);}
            60%{box-shadow: 0 0 80px rgb(241, 97, 97);}
        }
        .box>div{
            animation: moves 1s infinite;
            transition-delay: 1s;
        }
        .box_1{
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: red;
            border-bottom: 0;

        }
        div:nth-child(2){
            position: absolute;
            top: 0;
            left:80px;
        }
        .box_2{
            width: 100px;
            height: 130px;
            background: red;
            transform: rotateZ(57deg);
           
        }
        .box>div:nth-child(3){
            position: absolute;
            top: 2px;
            right: 31px;
            background-color: red;
            border-radius: 50% 50% 0% 0;
            box-shadow: 0 0 0 transparent !important;
        }
        .box>div:last-child{
            position: absolute;
            top: 4px;
            left: 12px;
            transform: rotateZ(122deg);
            border-radius: 0 0% 50% 50%;
        }
        /* .box:hover>div{
            box-shadow: 0 0 10px rgb(241, 97, 97);
        } */
    </style>
</head>
<body>
    <div class="box">
        <div class="box_1"></div>
        <div class="box_1"></div>
        <div class="box_2"></div>
        <div class="box_2"></div>
    </div>
</body>
</html>

html跳动的心实现代码

原文:https://www.cnblogs.com/zhuxinpeng-looking/p/10597300.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!