css实现100多种loading加载动画效果代码

代码语言:html

所属分类:加载滚动

代码描述:css实现100多种loading加载动画效果代码

代码标签: 多种 loading 加载 动画 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
    *, *:after, *:before {
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #263238;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #FF3D00;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #fff;
}

body {
  margin: 0;
  padding-top: 50px;
  display: flex;
  flex-wrap: wrap;
  background: #263238;
  font-family: Arial, Helvetica, sans-serif;
}
body.pop {
  overflow: hidden;
}

section {
  min-width: 200px;
  width: 33.33%;
  height: 200px;
  padding: 10px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  cursor: pointer;
  transition: 0.3s linear;
}
section:nth-child(2n+1) {
  background: rgba(0, 0, 0, 0.1);
}
section:hover {
  background: rgba(0, 0, 0, 0.3);
}
@media (max-width: 768px) {
  section {
    width: 50%;
  }
}
@media (max-width: 480px) {
  section {
    width: 100%;
  }
}

header {
  background: #0d161b;
  padding: 10px 20px;
  min-height: 50px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  z-index: 2000;
  justify-content: space-between;
}

.brand {
  color: #fff;
  font-size: 32px;
  display: inline-block;
  position: relative;
  text-decoration: none;
}
.brand::after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 5px;
  border: 3px solid #FFF;
  border-bottom-color: #FF3D00;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  -webkit-animation: rotation 0.6s linear infinite;
          animation: rotation 0.6s linear infinite;
}

.nav-btn {
  color: #fff;
  text-decoration: none;
}

.loader-1 {
  width: 48px;
  height: 48px;
  border: 5px solid #FFF;
  border-bottom-color: #FF3D00;
  border-radius: 50%;
  display: inline-block;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}

.loader-2 {
  width: 48px;
  height: 48px;
  border: 3px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-2:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-bottom-color: #FF3D00;
}

.loader-3 {
  width: 48px;
  height: 48px;
  border: 3px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-3:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-bottom-color: #FF3D00;
}

.loader-4 {
  width: 48px;
  height: 48px;
  border: 3px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-4:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid;
  border-color: #FF3D00 transparent;
}

.loader-5 {
  width: 48px;
  height: 48px;
  border: 3px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-5:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid;
  border-color: #FF3D00 transparent;
}

.loader-6 {
  width: 48px;
  height: 48px;
  border: 2px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-6:after, .loader-6:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  background: #FF3D00;
  width: 6px;
  height: 6px;
  transform: translate(150%, 150%);
  border-radius: 50%;
}
.loader-6:before {
  left: auto;
  top: auto;
  right: 0;
  bottom: 0;
  transform: translate(-150%, -150%);
}

.loader-7 {
  width: 48px;
  height: 48px;
  border: 2px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-7:after, .loader-7:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  background: #FF3D00;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.loader-7:before {
  left: auto;
  top: auto;
  right: 0;
  bottom: 0;
}

.loader-8 {
  width: 48px;
  height: 48px;
  border: 3px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-8:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  background: #FF3D00;
  width: 16px;
  height: 16px;
  transform: translate(-50%, 50%);
  border-radius: 50%;
}

.loader-9 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 2px solid #FF3D00;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-9:after {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  border: 2px solid #FFF;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.loader-10 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 3px solid;
  border-color: #FFF #FFF transparent;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-10:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 3px solid;
  border-color: transparent #FF3D00 #FF3D00;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  -webkit-animation: rotationBack 0.5s linear infinite;
          animation: rotationBack 0.5s linear infinite;
  transform-origin: center center;
}

.loader-11 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 3px solid;
  border-color: #FFF #FFF transparent transparent;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-11:after, .loader-11:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 3px solid;
  border-color: transparent transparent #FF3D00 #FF3D00;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  -webkit-animation: rotationBack 0.5s linear infinite;
          animation: rotationBack 0.5s linear infinite;
  transform-origin: center center;
}
.loader-11:before {
  width: 32px;
  height: 32px;
  border-color: #FFF #FFF transparent transparent;
  -webkit-animation: rotation 1.5s linear infinite;
          animation: rotation 1.5s linear infinite;
}

.loader-12 {
  width: 48px;
  height: 48px;
  border: 3px dotted #FFF;
  border-style: solid solid dotted dotted;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 2s linear infinite;
          animation: rotation 2s linear infinite;
}
.loader-12:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  border: 3px dotted #FF3D00;
  border-style: solid solid dotted;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  -webkit-animation: rotationBack 1s linear infinite;
          animation: rotationBack 1s linear infinite;
  transform-origin: center center;
}

.loader-13 {
  width: 48px;
  height: 48px;
  border: 2px solid #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-13:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  background: #FF3D00;
  width: 3px;
  height: 24px;
  transform: translateX(-50%);
}

.loader-14 {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
}
.loader-14::after, .loader-14::before {
  content: "";
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #FFF;
  position: absolute;
  left: 0;
  top: 0;
  -webkit-animation: animloader14 2s linear infinite;
          animation: animloader14 2s linear infinite;
}
.loader-14::after {
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
}

.loader-15 {
  width: 48px;
  height: 48px;
  border: 5px dotted #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 2s linear infinite;
          animation: rotation 2s linear infinite;
}

.loader-16 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  background: linear-gradient(0deg, rgba(255, 61, 0, 0.2) 33%, #ff3d00 100%);
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-16:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #263238;
}

.loader-17 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  border-top: 3px solid #FFF;
  border-right: 3px solid transparent;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}

.loader-18 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  border-top: 4px solid #FFF;
  border-right: 4px solid transparent;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-18:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border-bottom: 4px solid #FF3D00;
  border-left: 4px solid transparent;
}

.loader-19 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  border-top: 4px solid #FFF;
  border-right: 4px solid transparent;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-19:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border-left: 4px solid #FF3D00;
  border-bottom: 4px solid transparent;
  animation: rotation 0.5s linear infinite reverse;
}

.loader-20 {
  width: 48px;
  height: 48px;
  border: 5px solid;
  border-color: #FF3D00 transparent;
  border-radius: 50%;
  display: inline-block;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}

.loader-21 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 10px solid;
  border-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.5);
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}

.loader-22 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  border: 10px solid;
  -webkit-animation: animloader51 1s linear infinite alternate;
          animation: animloader51 1s linear infinite alternate;
}

.loader-23 {
  width: 48px;
  height: 48px;
  border: 3px solid #FFF;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-23:after {
  content: "";
  position: absolute;
  left: 20px;
  top: 31px;
  border: 10px solid transparent;
  border-right-color: #FFF;
  transform: rotate(-40deg);
}

.loader-24 {
  width: 48px;
  height: 48px;
  border-width: 3px;
  border-style: dashed solid solid dotted;
  border-color: #FF3D00 #FF3D00 transparent #FF3D00;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-24:after {
  content: "";
  position: absolute;
  left: 20px;
  top: 31px;
  border: 10px solid transparent;
  border-right-color: #FF3D00;
  transform: rotate(-40deg);
}

.loader-25 {
  width: 48px;
  height: 48px;
  background: #FFF;
  display: inline-block;
  border-radius: 50%;
  -webkit-animation: animloader14 1s ease-in infinite;
          animation: animloader14 1s ease-in infinite;
}

.loader-26 {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
}
.loader-26::after, .loader-26::before {
  content: "";
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFF;
  position: absolute;
  left: 0;
  top: 0;
  -webkit-animation: animloader14 2s linear infinite;
          animation: animloader14 2s linear infinite;
}
.loader-26::after {
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
}

.loader-27 {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
}
.loader-27::after, .loader-27::before {
  content: "";
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFF;
  position: absolute;
  left: 0;
  top: 0;
  -webkit-animation: animloader27 2s ease-in-out infinite;
          animation: animloader27 2s ease-in-out infinite;
}
.loader-27::after {
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
}

.loader-28 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  -webkit-animation: animloader28 1s linear infinite;
          animation: animloader28 1s linear infinite;
}

.loader-29 {
  border: 24px solid #FFF;
  border-bottom-color: #FF3D00;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}

.loader-30 {
  border: 2px solid #FFF;
  width: 48px;
  height: 48px;
  background: #FF3D00;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 2s linear infinite;
          animation: rotation 2s linear infinite;
}
.loader-30:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 24px solid;
  border-color: transparent #FFF;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.loader-31 {
  width: 48px;
  height: 48px;
  background: #FFF;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-31:after {
  content: "";
  position: absolute;
  left: 6px;
  top: 10px;
  width: 12px;
  height: 12px;
  color: #FF3D00;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 25px 2px, 10px 22px;
}

.loader-32 {
  width: 48px;
  height: 48px;
  border: 4px solid;
  background: rgba(255, 255, 255, 0.2);
  border-color: transparent #FFF #FFF transparent;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s ease-in-out infinite;
          animation: rotation 1s ease-in-out infinite;
}
.loader-32:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 12px solid;
  border-color: transparent #FF3D00 #FF3D00 transparent;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.loader-33 {
  border: 2px solid;
  border-color: transparent #FFF;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 2s linear infinite;
          animation: rotation 2s linear infinite;
}
.loader-33:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 24px solid;
  border-color: transparent rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.loader-34 {
  border: 24px solid;
  border-color: rgba(255, 255, 255, 0.15) rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  display: inline-block;
  -webkit-animation: animloader34 1s linear infinite;
          animation: animloader34 1s linear infinite;
}

.loader-35 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-35:after, .loader-35:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  background: #FF3D00;
  width: 16px;
  height: 16px;
  transform: translate(-50%, 50%);
  border-radius: 50%;
}
.loader-35:before {
  left: auto;
  right: 0;
  background: #FFF;
  transform: translate(50%, 100%);
}

.loader-36 {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  -webkit-animation: zeroRotation 1s linear infinite alternate;
          animation: zeroRotation 1s linear infinite alternate;
}
.loader-36:after, .loader-36:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  background: #FF3D00;
  width: 16px;
  height: 16px;
  transform: translate(-50%, 50%);
  border-radius: 50%;
}
.loader-36:before {
  left: auto;
  right: 0;
  transform: translate(50%, 100%);
}

.loader-37 {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
  color: #FFF;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-37:after, .loader-37:before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 0;
  background-color: #FFF;
  border-radius: 50%;
  -webkit-animation: scale50 1s infinite ease-in-out;
          animation: scale50 1s infinite ease-in-out;
}
.loader-37:before {
  top: auto;
  bottom: 0;
  background-color: #FF3D00;
  -webkit-animation-delay: 0.5s;
          animation-delay: 0.5s;
}

.loader-38 {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
  color: #FFF;
  -webkit-animation: rotation 1s linear infinite;
          animation: rotation 1s linear infinite;
}
.loader-38:after, .loader-38:before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  top: 50%;
  left: 50%;
  transform: scale(0.5) translate(0, 0);
  background-color: #FFF;
  border-radius: 50%;
  -webkit-animation: animloader38 1s infinite ease-in-out;
          animation: animloader38 1s infinite ease-in-out;
}
.loader-38:before {
  background-color: #FF3D00;
  transform: scale(0.5) translate(-48px, -48px);
}

.loader-39 {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  background: #FFF;
  -webkit-animation: shadowExpandX 2s linear infinite alternate;
          animation: shadowExpandX 2s linear infinite alternate;
}

.loader-40 {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  background: #FFF;
  box-shadow: -24px 0 #FFF, 24px 0 #FFF;
  -webkit-animation: shadowPulse 2s linear infinite;
          animation: shadowPulse 2s linear infinite;
}

.loader-41 {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  background: #FF3D00;
  color: #FFF;
  box-shadow: -24px 0, 24px 0;
  -webkit-animation: rotation 2s ease-in-out infinite;
          animation: rotation 2s ease-in-out infinite;
}

.loader-42 {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  color: #FFF;
  -webkit-animation: animloader42 1s linear infinite alternate;
          animation: animloader42 1s linear infinite alternate;
}

.loader-43 {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  color: #FFF;
  left: -100px;
  -webkit-animation: shadowRolling 2s linear infinite;
          animation: shadowRolling 2s linear infinite;
}

.loader-44 {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  color: #FFF;
  -webkit-animation: animloader44 2s linear infinite;
          animation: animloader44 2s linear infinite;
}

.loader-45 {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  color: #FFF;
  -webkit-animation: animloader45 1s linear infinite alternate;
          animation: animloader45 1s linear infinite alternate;
}

.loader-46 {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}
.loader-46::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: absolute;
  left: 0;
  transform: translate(-50%, 100%);
  -webkit-animation: animloader46 1s linear infinite;
          animation: animloader46 1s linear infinite;
  top: 0;
}

.loader-47 {
  width: 48px;
  height: 48px;
  display: inline-block;
  position: relative;
}
.loader-47::after, .loader-47::before {
  content: "";
  width: 48px;
  height: 48px;
  border: 2px solid #FFF;
  position: absolute;
  left: 0;
  top: 0;
  -webkit-animation: rotation 2s ease-in-out infinite;
          animation: rotation 2s ease-in-out infinite;
}
.loader-47::after {
  border-color: #FF3D00;
  -webkit-animation-delay: 1s;
          animation-delay: 1s;
}

.loader-48 {
  width: 48px;
  height: 48px;
  display: inli.........完整代码请登录后点击上方下载按钮下载查看

网友评论0