用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>
相关推荐
ayqy贾杰1 小时前
GPT-5.5+Codex全自动搓出macOS游戏,创作链路首次真正连续
前端·面试·游戏开发
英俊潇洒美少年3 小时前
Vue2/Vue3 vue-i18n完整改造流程(异步懒加载+后端接口请求)
前端·javascript·vue.js
空中海9 小时前
第七章:vue工程化与构建工具
前端·javascript·vue.js
zhensherlock9 小时前
Protocol Launcher 系列:Trello 看板管理的协议自动化
前端·javascript·typescript·node.js·自动化·github·js
zhuà!9 小时前
element的el-form提交校验没反应问题
前端·elementui
龙猫里的小梅啊9 小时前
CSS(一)CSS基础语法与样式引入
前端·css
小码哥_常9 小时前
从0到1,开启Android音视频开发之旅
前端
渔舟小调10 小时前
P19 | 前端加密通信层 pikachuNetwork.js 完整实现
开发语言·前端·javascript
qq_120840937110 小时前
Three.js 工程向:Draw Call 预算治理与渲染批处理实践
前端·javascript
不会聊天真君64713 小时前
JavaScript基础语法(Web前端开发笔记第三期)
前端·javascript·笔记