css实现三点汇集成立方体盒子loading加载动画效果代码

代码语言:html

所属分类:加载滚动

代码描述:css实现三点汇集成立方体盒子loading加载动画效果代码

代码标签: css 三点 汇集 立方体 盒子 loading 加载 动画

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
<style>
:root { 
	--color: #fff;
}

body {
	margin: 0;
	padding: 0;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #212121;
}

* {
	transform-style: preserve-3d;
}

.content {
	width: 50vmin;
	height: 50vmin;
	perspective: 100vmin;
	animation: spin-all 4s ease-in-out 0s infinite;
}



.cube {
	background: var(--color);
	width: 20vmin;
	height: 20vmin;
	border-radius: 2vmin;
	transform: rotate(48deg) rotateX(22.5deg) rotateY(-22.5deg);
	left: 14.5vmin;
	position: absolute;
	top: 5vmin;
	transition: all 1s ease 0s;
}



.cube, .cube:before, .cube:after {
	animation: spin-cube 2s ease-in-out -3s infinite alternate;
}

.cube:before, .cube:after {
	position: absolute;
	content: "";
	background: var(--color);
	width: calc(100% - 2vmin);
	height: calc(100% - 2vmin);
	border-radius: 2vmin;
	transform: rotateY(-90deg);
	transform-origin: right bottom;
	top: 2.5vmin;
	left: 4vmin;
	transition: all 1s ease 0s;
	animation-name: spin-cube-before;
}

.cube:after {
	top: 4vmin;
	left: 2.5vmin;
	transform: rotateX(90deg);
	animation-name: spin-cube-after;
}



@keyframes s.........完整代码请登录后点击上方下载按钮下载查看

网友评论0