用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 分钟前
黑马AI+前端教程 02-视频和音频-超链接-布局标签-表格-文本密码-单选复选框-单个多个文件上传-多行文本-按键-辅助标签
前端
jingling5559 分钟前
无需重新安装APK | uni-app 热更新技术实战
前端·javascript·前端框架·uni-app·node.js
遇见小美好y9 分钟前
uniapp 实现向下追加数据功能
前端·javascript·uni-app
wuhen_n10 分钟前
数据缓存策略:让我们的应用“快如闪电”
前端·javascript·vue.js
wuhen_n12 分钟前
自定义指令:为 DOM 操作提供高效的抽象入口
前端·javascript·vue.js
C_心欲无痕14 分钟前
前端 PDF 渲染与下载实现
前端·pdf
jiayong2314 分钟前
可视化流程设计器技术对比:钉钉风格 vs BPMN
java·前端·钉钉
前端不太难16 分钟前
Flutter Web / Desktop 为什么“能跑但不好用”?
前端·flutter·状态模式
甘露s19 分钟前
新手入门:传统 Web 开发与前后端分离开发的区别
开发语言·前端·后端·web
双河子思20 分钟前
自动化控制逻辑建模方法
前端·数据库·自动化