各种css加载loading动画效果

代码语言:html

所属分类:加载滚动

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

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

<style>
body {
  background: #16a085;
}

h1 {
  text-align: center;
  font-family: Arial;
  color: #FFF;
  font-size: 50px;
}

.loaders-container {
  padding: 20px;
  margin: 0 auto;
  width: 700px;
  text-align: center;
  font-size: 0;
}
.loaders-container .container {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  padding: 30px;
  width: 25%;
  height: 140px;
}

.box {
  position: relative;
  box-sizing: border-box;
  border: 4px solid #FFF;
  width: 80px;
  height: 80px;
  -webkit-animation: spin 3s infinite linear;
          animation: spin 3s infinite linear;
}
.box:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  box-sizing: border-box;
  border: 4px solid #FFF;
  width: 60px;
  height: 60px;
  -webkit-animation: pulse 1.5s infinite ease;
          animation: pulse 1.5s infinite ease;
}

.line {
  position: absolute;
  top: 50%;
  margin-left: 10px;
  width: 60px;
  height: 4px;
  background: #FFF;
  -webkit-animation: spin 1.5s infinite ease;
          animation: spin 1.5s infinite ease;
}
.line:nth-of-type(2) {
  -webkit-animation-delay: 0.1s;
          animation-delay: 0.1s;
}
.line:nth-of-type(3) {
  -webkit-animation-delay: 0.2s;
          animation-delay: 0.2s;
}
.line:nth-of-type(4) {
  -webkit-animation-delay: 0.3s;
          animation-delay: 0.3s;
}

.circle {
  box-sizing: border-box;
  width: 80px;
  height: 80px;
  border-radius: 100%;
  border: 10px solid rgba(255, 255, 255, 0.2);
  border-top-color: #FFF;
  -webkit-animation: spin 1s infinite linear;
          animation: spin 1s infinite linear;
}

.wave {
  margin-top: 15px;
  float: left;
  width: 18px;
  height: 40px;
  box-sizing: border-box;
  border: 2px solid #FFF;
  margin-left: -2px;
  -webkit-animation: slide 0.6s infinite linear;
          animation: slide 0.6s infinite linear;
}
.wave:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.wave:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}
.wave:nth-child(2n+1) {
  -webkit-animation-delay: 0.3s;
          animation-delay: 0.3s;
}

.circleloader {
  position: absolute;
  box-sizing: border-box;
  top: 50%;
  margin-top: -10px;
  border-radius: 16px;
  width: 80px;
  height: 20px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.4);
}
.circleloader:before {
  content: '';
  position: absolute;
  border-radius: 16px;
  width: 20px;
  height: 12px;
  left: 0;
  background: #FFF;
  -webkit-animation: push 1s infinite linear;
          animation: push 1s infinite linear;
}

.switchbox {
  position: relative;
  height: 80px;
  -webkit-animation: spin 2s infinite linear;
          animation: spin 2s infinite linear;
}
.switchbox .switch {
  position: absolute;
  top: 50%;
  margin-top: -10px;
  width: 20px;
  height: 20px;
  background: #FFF;
  border-radius: 2.........完整代码请登录后点击上方下载按钮下载查看

网友评论0