animation and transition 动画和过渡

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .demo-music .jump{
            width: 80px;
            height: 50px;
            position: absolute;
            top: 12px;
            left : 12px;
        }
        .demo-music .jump li{
            position: relative;
            float: left;
            height: 100%;
            width: 12%;
            overflow: hidden;
            margin-right: 1px;
        }

        .demo-music .jump li span{
            position: absolute;
            bottom: 0;
            display: block;
            width: 100px;
            height: 100%;
            background: radial-gradient(transparent 50%, rgba(255,162,162,0.8));
        }

        @keyframes jump {
            10% {
                height: 20%;
            }
            20% {
                height: 60%;
            }

            40% {
                height: 40%;
            }

            50% {
                height: 100%;
            }
        }

        @-webkit-keyframes jump {
            10% {
                height: 20%;
            }
            20% {
                height: 60%;
            }

            40% {
                height: 40%;
            }

            50% {
                height: 100%;
            }
        }

        .demo-music .jump .li1 span{
            animation: jump 0.6s linear 0s infinite;
            -webkit-animation: jump 0.6s linear 0s infinite;;
        }

        .demo-music .jump .li2 span{
            animation: jump 0.9s linear 0s infinite;
            -webkit-animation: jump 0.9s linear 0s infinite;;
        }

        .demo-music .jump .li3 span{
            animation: jump 0.5s linear 0s infinite;
            -webkit-animation: jump 0.5s linear 0s infinite;;
        }

        .demo-music .jump .li4 span{
            animation: jump 1s linear 0s infinite;
            -webkit-animation: jump 1s linear 0.6s infinite;;
        }

        .demo-music .jump .li5 span{
            animation: jump 1.2s linear 0s infinite;
            -webkit-animation: jump 1.2s linear 0s infinite;;
        }
    </style>
</head>
<body>

<div class="demo-music">
    <div class="music">
        <ul class="jump">
            <li class="li1"> <span class="ani-li"></span></li>
            <li class="li2"> <span class="ani-li"></span></li>
            <li class="li3"> <span class="ani-li"></span></li>
            <li class="li4"> <span class="ani-li"></span></li>
            <li class="li5"> <span class="ani-li"></span></li>
        </ul>
    </div>

</div>

</body>
</html>

result:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值