CSS的音频波浪

						<view class="startBox">
							<view class="ripple">
								<div class="music">
									<span class="line" :class="{
						    'line-Reverse': i % 2 > 0,
						    animationNone: recorderStatus == 3,
						  }" :style="{ 'animation-delay': (i - 1) * 0.1 + 's' }" v-for="i in 4" :key="getItemKey(i, 1)"></span>
									<span class="line" :class="{
						    'line-Reverse': i % 2 > 0,
						    animationNone: recorderStatus == 3,
						  }" :style="{ 'animation-delay': (i - 1) * 0.1 + 's' }" v-for="i in 4"
										:key="getItemKey(i, 2)"></span><span class="line" :class="{
						    'line-Reverse': i % 2 > 0,
						    animationNone: recorderStatus == 3,
						  }" :style="{ 'animation-delay': (i - 1) * 0.1 + 's' }" v-for="i in 4" :key="getItemKey(i, 3)"></span>
									<span class="line" :class="{
						    'line-Reverse': i % 2 > 0,
						    animationNone: recorderStatus == 3,
						  }" :style="{ 'animation-delay': (i - 1) * 0.1 + 's' }" v-for="i in 4" :key="getItemKey(i, 4)"></span>
								</div>
							</view>
						</view>

    .music {
        border-bottom: 0;
        width: auto;
        height: 92rpx;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .line {
        width: 8rpx;
        height: 20rpx;
        transition: 0.5s;
        border-radius: 4rpx;
         background-image: linear-gradient(#4EB1FF,#EDEEEF);
        margin: 0 5rpx;
        animation: equalize 0.8s infinite;
        animation-timing-function: linear;
    }
    
    .line-Reverse {
        animation: equalize2 0.8s infinite;
    }
    
    .line .animationNone {
        animation: none;
    }
    
    @keyframes equalize {
        0% {
            height: 92rpx;
        }
        
        25% {
            height: 45rpx;
        }
        
        50% {
            height: 0rpx;
        }
        
        75% {
            height: 45rpx;
        }
        
        100% {
            height: 92rpx;
        }
    }
    
    @keyframes equalize2 {
        0% {
            height: 0rpx;
        }
    
        25% {
            height: 45rpx;
        }
    
        50% {
            height: 92rpx;
        }
    
        75% {
            height: 50rpx;
        }
    
        100% {
            height: 60rpx;
        }
    }
    .startBox {
        // display: none;
        display: flex;
        justify-content: center;
        height: 96rpx;
        width: 334rpx;
        position: absolute;
        top: -538rpx;
    }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值