用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>
相关推荐
Demon--hx1 天前
[C++]const成员
前端·javascript·c++
良木林1 天前
Node.js基础:模块化与包
开发语言·前端·node.js
z***67771 天前
SpringBoot(7)-Swagger
android·前端·后端
Jackson@ML1 天前
用ASP.NET创建一个Blazer Web应用程序
前端·asp.net·blazor
shepherd1261 天前
Vue-Vben-Admin 从入门到实战:后端开发的前端探索之旅
前端·javascript·vue.js
CircleMouse1 天前
介绍几个axios接口请求顺序的问题
开发语言·前端·javascript·ecmascript
o***Z4481 天前
React自然语言
前端·react.js·前端框架
J***Q2921 天前
React部署方案详解
前端·react.js·前端框架
q***R3081 天前
React组件性能分析
前端·react.js·前端框架
5***79001 天前
React趋势
前端·react.js·前端框架