用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 分钟前
人工智能从0基础到精通
前端·人工智能·python
前端不太难12 分钟前
Navigation State 与页面内存泄漏的隐性关系
前端·ui·react
C+++Python17 分钟前
如何选择合适的锁机制来提高 Java 程序的性能?
java·前端·python
IT_陈寒24 分钟前
JavaScript 性能优化:7 个 V8 引擎偏爱的编码模式让你提速 40%
前端·人工智能·后端
小oo呆35 分钟前
【自然语言处理与大模型】LangChainV1.0入门指南:核心组件Messages
前端·javascript·easyui
果壳~1 小时前
【前端】【canvas】图片颜色填充工具实现详解
前端
Bigger1 小时前
Tauri (23)——为什么每台电脑位置显示效果不一致?
前端·rust·app
¥懒大王¥1 小时前
XSS-Game靶场教程
前端·安全·web安全·xss
ssshooter1 小时前
为什么移动端 safari 用 translate 移动元素卡卡的
前端·css·性能优化
闲云一鹤1 小时前
Claude Code 接入第三方AI模型(MiMo-V2-Flash)
前端·后端·claude