css实现9格圆形loading加载动画效果

代码语言:html

所属分类:加载滚动

代码描述:css实现9格圆形loading加载动画效果

代码标签: 圆形 loading 加载 动画 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
body {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #008b8b;
}
.loader {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-gap: 8px;
}
.loader div {
  width: 60px;
  height: 60px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #66cdaa;
  border-radius: 50%;
}
.loader div:before,
.loader div:after {
  content: '';
  width: 60px;
  height: 60px;
  position: absolute;
  border-radius: 50%;
}
.loader div:before {
  background-color: #ffdab9;
  animation: scale-1 2400ms linear infinite;
}
.loader div:after {
  background-color: #66cdaa;
  animation: scale-2 2400ms linear infinite;
}
.loader div:nth-child(2):before,
.loader div:nth-child(2):after {
  animation-delay: 300ms;
}
.loader div:nth-child(3):before,
.loader div:nth-child(3):after {
  animation-delay: 600ms;
}
.loader div:nth-child(4):before,
.loader div:nth-child(4):after {
  animation-delay: 900ms;
}
.loader div:nth-child(5):before,
.loader div:nth-child(5):after {
  animation-delay: 1200ms;
}
.loader div:nth-child(6):before,
.loader div:nth-child(6):after {
  animation-delay: 1500ms;
}
.loader div:nth-child(7):before,
.loader div:nth-child(7):after {
  animation-delay: 1800ms;
}
.loader div:nth-child(8):before,
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0