用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>
相关推荐
晓得迷路了3 分钟前
栗子前端技术周刊第 126 期 - Rspack 2.0、TypeScript 7.0 Beta、Git 2.54...
前端·javascript·ai编程
小小码农Come on4 分钟前
单例 QtObject 全局配置
开发语言·前端·javascript
摸鱼仙人~5 分钟前
HTTP状态码全量详解(定义+核心区别+业务场景+前端常见诱因+排查方案+工程处理)
前端·网络协议·http
Go 言 Go 语19 分钟前
Claude Code 核心加载机制详解
服务器·前端·数据库
朝阳3920 分钟前
CSS【详解】给子元素添加间距的最佳实践(含space 和 gap 的区别图解和面试的标准答案)
前端·css
s65166549622 分钟前
Makefile语法学习
java·linux·前端
悟空爬虫-彪哥30 分钟前
Stich接入Codex教程
java·前端·数据库
深海鱼在掘金30 分钟前
Next.js从入门到实战保姆级教程(第十五章):部署运维与 CI/CD
前端·ci/cd·next.js
Mr.mjw31 分钟前
vue中封装一个进度条组件,无需引入,纯css
javascript·css·vue.js
veminhe33 分钟前
Java后端、PC前端学习备忘
前端