学习探索-波浪

效果示例图

在这里插入图片描述

代码示例

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			* {
				padding: 0px;
				margin: 0px;
				box-sizing: border-box;
			}

			body {
				height: 100vh;
				background-color: #000;
				display: flex;
				justify-content: center;
				align-items: center;
			}

			.battery {
				width: 200px;
				height: 320px;
				background-color: #fff;
				border-radius: 10px 10px 5px 5px;
				position: relative;
			}

			.battery::before {
				content: "";
				width: 50px;
				height: 20px;
				background-color: #fff;
				position: absolute;
				top: -20px;
				left: 50%;
				transform: translateX(-50%);
				border-radius: 5px 5px 0px 0px;
			}

			.battery::after {
				content: "";
				position: absolute;
				left: 0;
				right: 0;
				bottom: 0px;
				top: 90%;
				border-radius: 10px 10px 5px 5px;
				background: linear-gradient(to bottom, #04e963 0%, #0bdf9f 44%);
				animation: change 10s linear infinite;
			}

			@keyframes change {
				0% {
					top: 100%;
					border-radius: 0px 0px 5px 5px;
					/* 给图像应用色相旋转。 */
					filter: hue-rotate(90deg);
				}

				95% {
					top: 5%;
					border-radius: 0px 0px 5px 5px;
				}

				100% {
					top: 0%;
					filter: hue-rotate(0deg);
				}
			}

			.cover {
				width: 100%;
				height: 100%;
				border-radius: 10px 10px 5px 5px;
				position: absolute;
				left: 0;
				top: 0;
				z-index: 1;
				overflow: hidden;
			}

			.cover::before {
				content: "";
				width: 400px;
				height: 400px;
				background: rgba(255, 255, 255, 0.8);
				position: absolute;
				border-radius: 40% 30%;
				left: -50%;
				animation: coverBefore 10s linear infinite;
			}

			.cover::after {
				content: "";
				width: 400px;
				height: 400px;
				background: rgba(255, 255, 255, 0.6);
				position: absolute;
				border-radius: 42% 40%;
				left: -50%;
				animation: coverAfter 10s linear infinite;
			}

			@keyframes coverBefore {
				0% {
					transform: rotate(0deg);
					bottom: 0%;
				}

				100% {
					transform: rotate(360deg);
					bottom: 100%;
				}
			}

			@keyframes coverAfter {
				0% {
					transform: rotate(30deg);
					bottom: 2%;
				}

				100% {
					transform: rotate(360deg);
					bottom: 95%;
				}
			}
		</style>
	</head>
	<body>
		<div class="battery">
			<div class="cover"></div>
		</div>
	</body>
</html>

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值