CSS 动画 心动

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title></title>
        <style type="text/css">
            *{
                margin: 0;
                padding: 0;
            }
            body{
                background-color: #26C9FF;
            }
            ul{
                width: 270px;
                height: 190px;
                margin: 100px auto;
            }
            ul li{
                list-style-type: none;
                width:20px ;
                height: 20px;
                float: left;
                border-radius: 20px;
                margin-right: 10px;
            }
            .box1{
                background-color: #f62e74;
                animation: love1 4s infinite ;
            }
            @keyframes love1{
                30%,50%{
                    height: 60px;
                    transform: translateY(-6px);
                }
                75%,100%{
                    height: 20px;
                    transform: translateY(0px);
                }
            }
            .box2{
                background-color: #f45330;
                animation: love2 4s infinite ;
                animation-delay: 0.15s;
            }
            @keyframes love2{
                30%,50%{
                    height: 125px;
                    transform: translateY(-34px);
                }
                75%,100%{
                    height: 20px;
                    transform: translateY(0px);
                }
            }
            .box3{
                background-color: #ffc883;
                animation: love3 4s infinite ;
                animation-delay: 0.3s;
            }
            @keyframes love3{
                30%,50%{
                    height:160px;
                    transform: translateY(-42px);
                }
                75%,100%{
                    height: 20px;
                    transform: translateY(0px);
                }
            }
            .box4{
                background-color: #30d268;
                animation: love4 4s infinite ;
                animation-delay: 0.45s;
            }
            @keyframes love4{
                30%,50%{
                    height:  180px;
                    transform: translateY(-32px);
                }
                75%,100%{
                    height:20px;
                    transform: translateY(0px);
                }
            }
            .box5{
                background-color:#006cb4;
                animation: love5 4s infinite ;
                animation-delay: 0.6s;
            }
            @keyframes love5{
                30%,50%{
                    height:190px;
                    transform: translateY(-18px);
                }
                75%,100%{
                    height: 20px;
                    transform: translateY(0px);
                }
            }
            .box6{
                background-color:  #784697;
                animation: love4 4s infinite ;
                animation-delay: 0.75s;
            }
            .box7{
                background-color: #ffc883;
                animation: love3 4s infinite ;
                animation-delay: 0.9s;
                }
            .box8{
                background-color: #f45330;
                animation: love2 4s infinite ;
                animation-delay: 1.05s;
            }
            .box9{

                background-color: #f62e74;
                animation: love1 4s infinite ;
                animation-delay: 1.2s;
            }
        </style>
    </head>
    <body>
        <ul>
            <li class="box1">
                
            </li>
            <li class="box2">
                
            </li>
            <li class="box3">
                
            </li>
            <li class="box4">
                
            </li>
            <li class="box5">
                
            </li>
            <li class="box6">
                
            </li>
            <li class="box7">
                
            </li>
            <li class="box8">
                
            </li>
            <li class="box9">
                
            </li>
        </ul>
    </body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值