风车loading加载动画效果

代码语言:html

所属分类:加载滚动

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

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

<style>
body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.loading {
  --loading-width: 45px;
  position: relative;
  width: var(--loading-width);
  height: var(--loading-width);
  transform: rotate(75deg);
}
.loading .bar {
  position: absolute;
  animation: 1.5s cubic-bezier(0.645, 0.045, 0.355, 1) infinite;
}
.loading .bar:nth-child(1) {
  bottom: calc(var(--loading-width) / 3);
  width: calc(var(--loading-width) / 3);
  height: 100%;
  background: #0984e3;
  transform: scaleY(0);
  transform-origin: bottom;
  animation-name: slide-bottom-top;
}
.loading .bar:nth-child(2) {
  left: calc(var(--loading-width) / 3);
  width: 100%;
  height: calc(var(--loading-width) / 3);
  background: #d63031;
  transform: scaleX(0);
  transform-origin: left;
  animation-name: slide-left-right;
}
.loading .bar:nth-child(3) {
  top: calc(var(--loading-width) / 3);
  right: 0;
  width: calc(var(--loading-width) / 3);
  height: 100%;
  background: #fdcb6e;
  transform: scaleY(0);
  transform-origin: top;
  animation-name: slide-top-bottom;
}
.loading .bar:nth-child(4) {
  right: calc(var(--loading-width.........完整代码请登录后点击上方下载按钮下载查看

网友评论0