css+div实现正方形嵌套渐变loading加载动画效果代码

代码语言:html

所属分类:加载滚动

代码描述:css+div实现正方形嵌套渐变loading加载动画效果代码

代码标签: css div 正方形 嵌套 渐变 loading 加载 动画

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

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
    <title>BFW NEW PAGE</title>

     <style>
body{
    padding-top: 200px;
    background: black;
}
.container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader {
  position: relative;
  width: 200px;
  height: 200px;
  perspective: 800px;
}

.crystal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  opacity: 0;
  transform-origin: bottom center;
  transform: translate(-50%, -50%) rotateX(45deg) rotateZ(0deg);
  animation: spin 4s linear infinite, emerge 2s ease-in-out infinite alternate,
    fadeIn 0.3s ease-out forwards;
  border-radius: 10px;
  visibility: hidden;
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotateX(45deg) rotateZ(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotateX(45deg) rotateZ(360deg);
  }
}

@keyframes emerge {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1);
    opacity: .........完整代码请登录后点击上方下载按钮下载查看

网友评论0