纯CSS实现液面流动上涨,水面效果,充电效果

在这里插入图片描述
直接上图片效果+代码

<!DOCTYPE html>
<html>
	<head>
		<meta charset="gb2312" />
		<style>
			html,body {
			    width: 100%;
			    height: 100%;
			    display: flex;
			    background: #ceb68b;
			}
			
			.a {
			    position: relative;
			    width: 540px;
			    margin: auto;
			}		
			.b {
			    position: relative;
			    height: 220px;
			    box-sizing: border-box;
			    border-radius: 15px 15px 5px 5px;
			    box-shadow: 0 0 5px 2px rgba(255, 255, 255, 0.22);
			    background: #fff;
			    z-index: 1;			    			    
			}
			.b::before {
			    content: "";
			    position: absolute;
			    left: 0;
			    right: 0;
			    bottom: 0;
			    top: 80%;
			    background: linear-gradient(to bottom, #7abcff 0%, #00BCD4 44%, #2196F3 100%);
			    border-radius: 0px 0px 5px 5px;
			    box-shadow: 0 14px 28px rgba(33, 150, 243, 0), 0 10px 10px rgba(9, 188, 215, 0.08);
			    animation: charging 10s linear infinite;
			    filter: hue-rotate(90deg);
			}
			.w {
			    position: absolute;
			    top: 0;
			    left: 0;
			    height: 220px;
			    width: 540px;
			    border-radius: 15px 15px 5px 5px;
			    overflow: hidden;
			}
			
			.wave {
			    position: absolute;
			    width: 1540px;
			    height: 1540px;
			    background: rgba(255, 255, 255, .8);
			    border-radius: 45% 47% 44% 42%;
			    bottom: 25px;
			    left: 50%;
			    transform: translate(-50%, 0);
			    z-index: 1;
			    animation: move 10s linear infinite;
			}
			
			.wave:nth-child(2) {
			    border-radius: 38% 46% 43% 47%;
			    transform: translate(-50%, 0) rotate(-135deg);
			}
			
			.wave:nth-child(3) {
			    border-radius: 42% 46% 37% 40%;
			    transform: translate(-50%, 0) rotate(135deg);
			}
			
			@keyframes charging {
				50% {
			        box-shadow: 0 14px 28px rgba(0, 150, 136, 0.83), 0px 4px 10px rgba(9, 188, 215, 0.4);
			    }
			    
			    95% {
			        top: 5%;
			        filter: hue-rotate(0deg);
			        border-radius: 0 0 5px 5px;
			        box-shadow: 0 14px 28px rgba(4, 188, 213, .2), 0 10px 10px rgba(9, 188, 215, 0.08);
			    }
			    100% {
			        top: 0%;
			        filter: hue-rotate(0deg);
			        border-radius: 15px 15px 5px 5px;
			        box-shadow: 0 14px 28px rgba(4, 188, 213, 0), 0 10px 10px rgba(9, 188, 215, 0.4);
			    }
			}
			
			@keyframes move {
			    100% {
			        transform: translate(-50%, -160px) rotate(720deg);
			    }
			}

		</style>
	</head>
	<body>
		<div class="a">
		    <div class="b"></div>
		    <div class="w">
		        <div class="wave"></div>
		        <div class="wave"></div>
		        <div class="wave"></div>
		    </div>
		</div>	
	</body>
</html>

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值