用css画一个loading

html 复制代码
<!DOCTYPE html>
<html>
<head>
	<title>loading</title>
	<style>
		.loading { position : relative; display : inline-block; }
		.loading .dot { position: absolute; opacity : 0; width: 64px; height: 64px; transform: rotate(225deg); animation-name: loading; animation-iteration-count: infinite; animation-duration: 5.28s; }
		.loading .dot:after { content : ""; position : absolute; width : 6px; height : 6px; border-radius : 50%; background : #000; }
		.loading .dot:nth-child(2) { animation-delay : .23s; }
		.loading .dot:nth-child(3) { animation-delay : .46s; }
		.loading .dot:nth-child(4) { animation-delay : .69s; }
		.loading .dot:nth-child(5) { animation-delay : .92s; }
		
		@keyframes loading {
			0% { transform : rotate(225deg); opacity : 1; animation-timing-function : cubic-bezier(0, 0, 0.58, 1.0); }
			8% { transform : rotate(345deg); animation-timing-function : cubic-bezier(0.0, 0.0, 1.0, 1.0); }
			30% { transform : rotate(455deg); animation-timing-function : cubic-bezier(0.42, 0, 0.58, 1.0); }
			40% { transform : rotate(690deg); animation-timing-function : cubic-bezier(0.0, 0.0, 1.0, 1.0); }
			60% { transform : rotate(815deg); opacity : 1; animation-timing-function : cubic-bezier(0, 0, 0.58, 1.0); }
			75% { transform : rotate(965deg); animation-timing-function : cubic-bezier(0, 0, 0.58, 1.0); }
			76% { opacity : 0; }
			100% { opacity : 0; }
		}
</style>
</head>
<body>
	
<div class="loading" >
	<div class="dot"></div>
	<div class="dot"></div>
	<div class="dot"></div>
	<div class="dot"></div>
	<div class="dot"></div>
</div>
</body>
</html>
相关推荐
用户47949283569152 分钟前
XSS、CSRF、CSP、HttpOnly 全扫盲:前端安全不只是后端的事
前端·后端·面试
O***p6044 分钟前
当“前端虚拟化”成为可能:构建下一代 Web 应用的新范式
前端
孤酒独酌19 分钟前
一次断网重连引发的「模块加载缓存」攻坚战
前端
jinzeming99923 分钟前
Vue3 PDF 预览组件设计与实现分析
前端
编程小Y24 分钟前
Vue 3 + Vite
前端·javascript·vue.js
GDAL33 分钟前
前端保存用户登录信息 深入全面讲解
前端·状态模式
大菜菜40 分钟前
Molecule Framework -EditorService API 详细文档
前端
Anita_Sun41 分钟前
😋 核心原理篇:线程池的 5 大核心组件
前端·node.js
灼华_1 小时前
Web前端移动端开发常见问题及解决方案(完整版)
前端
_请输入用户名1 小时前
Vue3 Patch 全过程
前端·vue.js