随笔 - 326,  文章 - 0,  评论 - 0,  阅读 - 16万

HTML标签

<div class="loading">
 <span></span>
 <span></span>
 <span></span>
 <span></span>
 <span></span>
</div>

CSS样式

<style>
.loading {
	width: 80px;
	height: 40px;
	margin: 0 auto;
	margin-top: 100px;
}

.loading span {
	display: inline-block;
	width: 8px;
	height: 100%;
	border-radius: 4px;
	background: lightgreen;
	-webkit-animation: load 1s ease infinite;
}

@-webkit-keyframes load {

	0%,
	100% {
		height: 40px;
		background: lightgreen;
	}

	50% {
		height: 70px;
		margin: -15px 0;
		background: lightblue;
	}
}

.loading span:nth-child(2) {
	-webkit-animation-delay: 0.2s;
}

.loading span:nth-child(3) {
	-webkit-animation-delay: 0.4s;
}

.loading span:nth-child(4) {
	-webkit-animation-delay: 0.6s;
}

.loading span:nth-child(5) {
	-webkit-animation-delay: 0.8s;
}
</style>
posted on   文种玉  阅读(85)  评论(0编辑  收藏  举报
(评论功能已被禁用)
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示