Анимированные прелоадеры
Несколько видов анимированных загрузчиков для сайта. Анимация сделана на CSS3
HTML
<div class="loader-one">
<div class="loader-one__center"></div>
<div class="loader-one__item"></div>
<div class="loader-one__item"></div>
<div class="loader-one__item"></div>
<div class="loader-one__item"></div>
<div class="loader-one__item"></div>
<div class="loader-one__item"></div>
</div>
<svg class="loader-one__svg" xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="goo">
<feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur" />
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7" result="goo" />
<feBlend in="SourceGraphic" in2="goo" />
</filter>
</defs>
</svg>
CSS
.loader-one__svg {
display: none;
}
.loader-one {
-webkit-filter: url(#goo);
filter: url(#goo);
width: 200px;
height: 200px;
margin: auto;
position: relative;
overflow: hidden;
border-radius: 70px;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.loader-one__center {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
position: absolute;
background: #2196F3;
top: 50%;
left: 50%;
width: 30px;
height: 30px;
-webkit-transform-origin: left top;
transform-origin: left top;
-webkit-transform: scale(0.9) translate(-50%, -50%);
transform: scale(0.9) translate(-50%, -50%);
-webkit-animation: blob-grow linear 3.4s infinite;
animation: blob-grow linear 3.4s infinite;
border-radius: 50%;
-webkit-box-shadow: 0 -10px 40px -5px #2196F3;
box-shadow: 0 -10px 40px -5px #2196F3;
}
.loader-one__item {
position: absolute;
background: #2196F3;
top: 50%;
left: 50%;
width: 30px;
height: 30px;
border-radius: 50%;
-webkit-animation: blobs ease-out 3.4s infinite;
animation: blobs ease-out 3.4s infinite;
-webkit-transform: scale(0.9) translate(-50%, -50%);
transform: scale(0.9) translate(-50%, -50%);
-webkit-transform-origin: center top;
transform-origin: center top;
opacity: 0;
}
.loader-one__item:nth-child(1) {
-webkit-animation-delay: 0.2s;
animation-delay: 0.2s;
}
.loader-one__item:nth-child(2) {
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.loader-one__item:nth-child(3) {
-webkit-animation-delay: 0.6s;
animation-delay: 0.6s;
}
.loader-one__item:nth-child(4) {
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.loader-one__item:nth-child(5) {
-webkit-animation-delay: 1s;
animation-delay: 1s;
}
@-webkit-keyframes blobs {
0% {
opacity: 0;
-webkit-transform: scale(0) translate(calc(-330px - 50%), -50%);
transform: scale(0) translate(calc(-330px - 50%), -50%);
}
1% {
opacity: 1;
}
35%, 65% {
opacity: 1;
-webkit-transform: scale(0.9) translate(-50%, -50%);
transform: scale(0.9) translate(-50%, -50%);
}
99% {
opacity: 1;
}
100% {
opacity: 0;
-webkit-transform: scale(0) translate(calc(330px - 50%), -50%);
transform: scale(0) translate(calc(330px - 50%), -50%);
}
}
@keyframes blobs {
0% {
opacity: 0;
-webkit-transform: scale(0) translate(calc(-330px - 50%), -50%);
transform: scale(0) translate(calc(-330px - 50%), -50%);
}
1% {
opacity: 1;
}
35%, 65% {
opacity: 1;
-webkit-transform: scale(0.9) translate(-50%, -50%);
transform: scale(0.9) translate(-50%, -50%);
}
99% {
opacity: 1;
}
100% {
opacity: 0;
-webkit-transform: scale(0) translate(calc(330px - 50%), -50%);
transform: scale(0) translate(calc(330px - 50%), -50%);
}
}
@-webkit-keyframes blob-grow {
0%, 39% {
-webkit-transform: scale(0) translate(-50%, -50%);
transform: scale(0) translate(-50%, -50%);
}
40%, 42% {
-webkit-transform: scale(1, 0.9) translate(-50%, -50%);
transform: scale(1, 0.9) translate(-50%, -50%);
}
43%, 44% {
-webkit-transform: scale(1.2, 1.1) translate(-50%, -50%);
transform: scale(1.2, 1.1) translate(-50%, -50%);
}
45%, 46% {
-webkit-transform: scale(1.3, 1.2) translate(-50%, -50%);
transform: scale(1.3, 1.2) translate(-50%, -50%);
}
47%, 48% {
-webkit-transform: scale(1.4, 1.3) translate(-50%, -50%);
transform: scale(1.4, 1.3) translate(-50%, -50%);
}
52% {
-webkit-transform: scale(1.5, 1.4) translate(-50%, -50%);
transform: scale(1.5, 1.4) translate(-50%, -50%);
}
54% {
-webkit-transform: scale(1.7, 1.6) translate(-50%, -50%);
transform: scale(1.7, 1.6) translate(-50%, -50%);
}
58% {
-webkit-transform: scale(1.8, 1.7) translate(-50%, -50%);
transform: scale(1.8, 1.7) translate(-50%, -50%);
}
68%, 70% {
-webkit-transform: scale(1.7, 1.5) translate(-50%, -50%);
transform: scale(1.7, 1.5) translate(-50%, -50%);
}
78% {
-webkit-transform: scale(1.6, 1.4) translate(-50%, -50%);
transform: scale(1.6, 1.4) translate(-50%, -50%);
}
80%, 81% {
-webkit-transform: scale(1.5, 1.4) translate(-50%, -50%);
transform: scale(1.5, 1.4) translate(-50%, -50%);
}
82%, 83% {
-webkit-transform: scale(1.4, 1.3) translate(-50%, -50%);
transform: scale(1.4, 1.3) translate(-50%, -50%);
}
84%, 85% {
-webkit-transform: scale(1.3, 1.2) translate(-50%, -50%);
transform: scale(1.3, 1.2) translate(-50%, -50%);
}
86%, 87% {
-webkit-transform: scale(1.2, 1.1) translate(-50%, -50%);
transform: scale(1.2, 1.1) translate(-50%, -50%);
}
90%, 91% {
-webkit-transform: scale(1, 0.9) translate(-50%, -50%);
transform: scale(1, 0.9) translate(-50%, -50%);
}
92%, 100% {
-webkit-transform: scale(0) translate(-50%, -50%);
transform: scale(0) translate(-50%, -50%);
}
}
@keyframes blob-grow {
0%, 39% {
-webkit-transform: scale(0) translate(-50%, -50%);
transform: scale(0) translate(-50%, -50%);
}
40%, 42% {
-webkit-transform: scale(1, 0.9) translate(-50%, -50%);
transform: scale(1, 0.9) translate(-50%, -50%);
}
43%, 44% {
-webkit-transform: scale(1.2, 1.1) translate(-50%, -50%);
transform: scale(1.2, 1.1) translate(-50%, -50%);
}
45%, 46% {
-webkit-transform: scale(1.3, 1.2) translate(-50%, -50%);
transform: scale(1.3, 1.2) translate(-50%, -50%);
}
47%, 48% {
-webkit-transform: scale(1.4, 1.3) translate(-50%, -50%);
transform: scale(1.4, 1.3) translate(-50%, -50%);
}
52% {
-webkit-transform: scale(1.5, 1.4) translate(-50%, -50%);
transform: scale(1.5, 1.4) translate(-50%, -50%);
}
54% {
-webkit-transform: scale(1.7, 1.6) translate(-50%, -50%);
transform: scale(1.7, 1.6) translate(-50%, -50%);
}
58% {
-webkit-transform: scale(1.8, 1.7) translate(-50%, -50%);
transform: scale(1.8, 1.7) translate(-50%, -50%);
}
68%, 70% {
-webkit-transform: scale(1.7, 1.5) translate(-50%, -50%);
transform: scale(1.7, 1.5) translate(-50%, -50%);
}
78% {
-webkit-transform: scale(1.6, 1.4) translate(-50%, -50%);
transform: scale(1.6, 1.4) translate(-50%, -50%);
}
80%, 81% {
-webkit-transform: scale(1.5, 1.4) translate(-50%, -50%);
transform: scale(1.5, 1.4) translate(-50%, -50%);
}
82%, 83% {
-webkit-transform: scale(1.4, 1.3) translate(-50%, -50%);
transform: scale(1.4, 1.3) translate(-50%, -50%);
}
84%, 85% {
-webkit-transform: scale(1.3, 1.2) translate(-50%, -50%);
transform: scale(1.3, 1.2) translate(-50%, -50%);
}
86%, 87% {
-webkit-transform: scale(1.2, 1.1) translate(-50%, -50%);
transform: scale(1.2, 1.1) translate(-50%, -50%);
}
90%, 91% {
-webkit-transform: scale(1, 0.9) translate(-50%, -50%);
transform: scale(1, 0.9) translate(-50%, -50%);
}
92%, 100% {
-webkit-transform: scale(0) translate(-50%, -50%);
transform: scale(0) translate(-50%, -50%);
}
}
HTML
<div class="loader-two">
<div class="loader-two__preloader">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
CSS
.loader-two {
position: relative;
display: block;
height: 100px;
}
.loader-two__preloader {
width: 100px;
height: 100px;
position: absolute;
left: 50%;
top: 50%;
transform: translateX(-50%) translateY(-50%);
animation: rotatePreloader 2s infinite ease-in;
}
@keyframes rotatePreloader {
0% {
transform: translateX(-50%) translateY(-50%) rotateZ(0deg);
}
100% {
transform: translateX(-50%) translateY(-50%) rotateZ(-360deg);
}
}
.loader-two__preloader div {
position: absolute;
width: 100%;
height: 100%;
opacity: 0;
}
.loader-two__preloader div:before {
content: "";
position: absolute;
left: 50%;
top: 0%;
width: 10%;
height: 10%;
background-color: #333333;
transform: translateX(-50%);
border-radius: 50%;
}
.loader-two__preloader div:nth-child(1) {
transform: rotateZ(0deg);
animation: rotateCircle1 2s infinite linear;
z-index: 9;
}
@keyframes rotateCircle1 {
0% {
opacity: 0;
}
0% {
opacity: 1;
transform: rotateZ(36deg);
}
7% {
transform: rotateZ(0deg);
}
57% {
transform: rotateZ(0deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(2) {
transform: rotateZ(36deg);
animation: rotateCircle2 2s infinite linear;
z-index: 8;
}
@keyframes rotateCircle2 {
5% {
opacity: 0;
}
5.0001% {
opacity: 1;
transform: rotateZ(0deg);
}
12% {
transform: rotateZ(-36deg);
}
62% {
transform: rotateZ(-36deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(3) {
transform: rotateZ(72deg);
animation: rotateCircle3 2s infinite linear;
z-index: 7;
}
@keyframes rotateCircle3 {
10% {
opacity: 0;
}
10.0002% {
opacity: 1;
transform: rotateZ(-36deg);
}
17% {
transform: rotateZ(-72deg);
}
67% {
transform: rotateZ(-72deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(4) {
transform: rotateZ(108deg);
animation: rotateCircle4 2s infinite linear;
z-index: 6;
}
@keyframes rotateCircle4 {
15% {
opacity: 0;
}
15.0003% {
opacity: 1;
transform: rotateZ(-72deg);
}
22% {
transform: rotateZ(-108deg);
}
72% {
transform: rotateZ(-108deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(5) {
transform: rotateZ(144deg);
animation: rotateCircle5 2s infinite linear;
z-index: 5;
}
@keyframes rotateCircle5 {
20% {
opacity: 0;
}
20.0004% {
opacity: 1;
transform: rotateZ(-108deg);
}
27% {
transform: rotateZ(-144deg);
}
77% {
transform: rotateZ(-144deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(6) {
transform: rotateZ(180deg);
animation: rotateCircle6 2s infinite linear;
z-index: 4;
}
@keyframes rotateCircle6 {
25% {
opacity: 0;
}
25.0005% {
opacity: 1;
transform: rotateZ(-144deg);
}
32% {
transform: rotateZ(-180deg);
}
82% {
transform: rotateZ(-180deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(7) {
transform: rotateZ(216deg);
animation: rotateCircle7 2s infinite linear;
z-index: 3;
}
@keyframes rotateCircle7 {
30% {
opacity: 0;
}
30.0006% {
opacity: 1;
transform: rotateZ(-180deg);
}
37% {
transform: rotateZ(-216deg);
}
87% {
transform: rotateZ(-216deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(8) {
transform: rotateZ(252deg);
animation: rotateCircle8 2s infinite linear;
z-index: 2;
}
@keyframes rotateCircle8 {
35% {
opacity: 0;
}
35.0007% {
opacity: 1;
transform: rotateZ(-216deg);
}
42% {
transform: rotateZ(-252deg);
}
92% {
transform: rotateZ(-252deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(9) {
transform: rotateZ(288deg);
animation: rotateCircle9 2s infinite linear;
z-index: 1;
}
@keyframes rotateCircle9 {
40% {
opacity: 0;
}
40.0008% {
opacity: 1;
transform: rotateZ(-252deg);
}
47% {
transform: rotateZ(-288deg);
}
97% {
transform: rotateZ(-288deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
.loader-two__preloader div:nth-child(10) {
transform: rotateZ(324deg);
animation: rotateCircle10 2s infinite linear;
z-index: 0;
}
@keyframes rotateCircle10 {
45% {
opacity: 0;
}
45.0009% {
opacity: 1;
transform: rotateZ(-288deg);
}
52% {
transform: rotateZ(-324deg);
}
102% {
transform: rotateZ(-324deg);
}
100% {
transform: rotateZ(-324deg);
opacity: 1;
}
}
HTML
<div class="loader-three"></div>
CSS
.loader-three {
position: relative;
display: inline-block;
vertical-align: middle;
height: 100px;
width: 100px;
-webkit-perspective: 60vh;
perspective: 60vh;
}
.loader-three:before,
.loader-three:after {
content: " ";
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
}
.loader-three:before {
left: -13.333333333333334vh;
background: linear-gradient(135deg, #fccf31, rgba(245,85,85,0.95));
-webkit-transform: translateZ(0vh);
transform: translateZ(0vh);
z-index: 1;
-webkit-animation: rotation1 1.5s ease-out infinite;
animation: rotation1 1.5s ease-out infinite;
}
.loader-three:after {
right: -13.333333333333334vh;
background: linear-gradient(135deg, #e2b0ff, rgba(159,68,211,0.95));
-webkit-transform: translateZ(0vh);
transform: translateZ(0vh);
z-index: 1;
-webkit-animation: rotation2 1.5s ease-out infinite;
animation: rotation2 1.5s ease-out infinite;
}
@-webkit-keyframes rotation1 {
25% {
left: 0;
-webkit-transform: translateZ(-10vh);
transform: translateZ(-10vh);
}
50% {
left: 13.333333333333334vh;
-webkit-transform: translateZ(0vh);
transform: translateZ(0vh);
}
75% {
left: 0;
-webkit-transform: translateZ(20vh);
transform: translateZ(20vh);
z-index: 2;
}
}
@keyframes rotation1 {
25% {
left: 0;
-webkit-transform: translateZ(-10vh);
transform: translateZ(-10vh);
}
50% {
left: 13.333333333333334vh;
-webkit-transform: translateZ(0vh);
transform: translateZ(0vh);
}
75% {
left: 0;
-webkit-transform: translateZ(20vh);
transform: translateZ(20vh);
z-index: 2;
}
}
@-webkit-keyframes rotation2 {
25% {
right: 0;
-webkit-transform: translateZ(20vh);
transform: translateZ(20vh);
z-index: 2;
}
50% {
right: 13.333333333333334vh;
-webkit-transform: translateZ(0vh);
transform: translateZ(0vh);
}
75% {
right: 0;
-webkit-transform: translateZ(-10vh);
transform: translateZ(-10vh);
}
}
@keyframes rotation2 {
25% {
right: 0;
-webkit-transform: translateZ(20vh);
transform: translateZ(20vh);
z-index: 2;
}
50% {
right: 13.333333333333334vh;
-webkit-transform: translateZ(0vh);
transform: translateZ(0vh);
}
75% {
right: 0;
-webkit-transform: translateZ(-10vh);
transform: translateZ(-10vh);
}
}
HTML
<div class="loader-four">
<div class="loader-four__preloader"></div>
</div>
CSS
.loader-four {
position: relative;
display: inline-block;
vertical-align: middle;
width: 100px;
height: 100px;
margin: 20px 0
}
.loader-four__preloader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #9370DB;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
.loader-four__preloader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #BA55D3;
-webkit-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
.loader-four__preloader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FF00FF;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
HTML
<div class="loader-five">
<div class="loader-five__dot">
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
</div>
<div class="loader-five__dot">
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
</div>
<div class="loader-five__dot">
<div class="dot"></div>
<div class="dot"></div>
<div class="dot"></div>
</div>
</div>
CSS
.loader-five,
.loader-five__dot {
position: relative;
width: 100px;
height: 100px;
}
.loader-five {
margin: auto;
transform-origin: center;
animation: anirotate 10s linear infinite;
}
.loader-five__dot {
position: absolute;
border: 0px solid #fff;
border-radius: 50px;
}
.loader-five__dot:nth-child(2) {
transform: rotate(40deg);
}
.loader-five__dot:nth-child(2) .dot {
animation-delay: -0.5s;
}
.loader-five__dot:nth-child(3) {
transform: rotate(80deg);
}
.loader-five__dot:nth-child(3) .dot {
animation-delay: -1s;
}
.dot {
position: absolute;
height: 10px;
width: 10px;
background: #000;
border-radius: 5px;
transform: translate(0, 0);
}
.dot:nth-child(1) {
top: 0;
left: calc(50% - 5px);
animation: ani1 2s infinite;
}
.dot:nth-child(2) {
bottom: calc(28% - 5px);
left: calc(11% - 5px);
animation: ani2 2s infinite;
}
.dot:nth-child(3) {
bottom: calc(28% - 5px);
right: calc(11% - 5px);
animation: ani3 2s infinite;
}
[hidden] {
display: none;
}
@keyframes anirotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-359deg);
}
}
@keyframes ani1 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(-40px, 67px);
}
}
@keyframes ani2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(77px, 0);
}
}
@keyframes ani3 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(-39px, -67px);
}
}
HTML
<div class="loader-six">
<div class="loader-six__item loader-six--1"></div>
<div class="loader-six__item loader-six--2"></div>
<div class="loader-six__item loader-six--3"></div>
<div class="loader-six__item loader-six--4"></div>
</div>
CSS.loader-six {
position: relative;
width: 100px;
height: 100px;
margin: auto;
}
.loader-six__item {
width: 100px;
height: 100px;
position: absolute;
}
.loader-six--1 {
background-color: #FA5667;
top: 0;
left: 0;
z-index: 1;
animation: item-1_move 1.8s cubic-bezier(.6,.01,.4,1) infinite;
}
.loader-six--2 {
background-color: #7A45E5;
top: 0;
right: 0;
animation: item-2_move 1.8s cubic-bezier(.6,.01,.4,1) infinite;
}
.loader-six--3 {
background-color: #1B91F7;
bottom: 0;
right: 0;
z-index: 1;
animation: item-3_move 1.8s cubic-bezier(.6,.01,.4,1) infinite;
}
.loader-six--4 {
background-color: #FAC24C;
bottom: 0;
left: 0;
animation: item-4_move 1.8s cubic-bezier(.6,.01,.4,1) infinite;
}
@keyframes item-1_move {
0%, 100% {transform: translate(0, 0)}
25% {transform: translate(0, 50px)}
50% {transform: translate(50px, 50px)}
75% {transform: translate(50px, 0)}
}
@keyframes item-2_move {
0%, 100% {transform: translate(0, 0)}
25% {transform: translate(-50px, 0)}
50% {transform: translate(-50px, 50px)}
75% {transform: translate(0, 50px)}
}
@keyframes item-3_move {
0%, 100% {transform: translate(0, 0)}
25% {transform: translate(0, -50px)}
50% {transform: translate(-50px, -50px)}
75% {transform: translate(-50px, 0)}
}
@keyframes item-4_move {
0%, 100% {transform: translate(0, 0)}
25% {transform: translate(50px, 0)}
50% {transform: translate(50px, -50px)}
75% {transform: translate(0, -50px)}
}
Ссылки