File size: 1,951 Bytes
c3d5f0d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html>
<head>
  <style>/**
 * This work is licensed under the Creative Commons
 * Attribution 3.0 Unported License. To view a copy
 * of this license, visit http://creativecommons.org/licenses/by/3.0/.
 *
 * Author: Girish Sharma <scrapmachines@gmail.com>
 */

/* Demo specific styles begin */

* {margin: 0; padding: 0;}
body { 
  background: #eee;
}
.loader-3d {
  top: calc(50% - 50px);
  left: calc(50% - 100px);
  position: absolute !important;
}
/* Demo specific styles end */

.loader-3d, .loader-3d:before, .loader-3d:after {
  width: 200px;
  height: 20px;
  position: absolute;
  background-image: radial-gradient(closest-side, #111 100%, transparent), radial-gradient(closest-side, #111 100%, transparent);
  background-size: 20px 20px, 20px 20px;
  background-position: 0% center, 100% center;
  background-repeat: no-repeat;
  animation: slide 1.5s cubic-bezier(.5,0,.5,1) infinite, zoom ease-out .75s infinite alternate, center-margin ease-out .75s infinite alternate;
  opacity: 0;
  content: '';
}
.loader-3d {
  animation: slide 1.5s cubic-bezier(.5,0,.5,1) .5s infinite, zoom ease-out .75s infinite .5s alternate, center-padding ease-out .75s infinite .5s alternate !important;
  background-origin: content-box !important;
  height: 100px;
  opacity: 1;
}
.loader-3d:after {
  animation-delay: 1s;
}

@keyframes slide {
  0% {
    background-position: 0, 100%;
    opacity: 1;
  }
  0.001% {
    background-position: 0 0, 100% 100%;
  }
  99.999% {
    background-position: 100% 0, 0 100%;
  }
  to {
    background-position: 100%, 0;
    opacity: 1;
  }
}

@keyframes zoom {
  to {
    background-size: 40px 40px, 10px 10px;
  }
}

@keyframes center-margin {
  from {
    top: calc(50% - 10px);
  }
  to {
    top: 0;
    height: 100px
  }
}

@keyframes center-padding {
  from {
    padding: 40px 0;
    height: 20px;
  }
}
</style>
</head>
<body>
  <div class="loader-3d"></div>
  <script></script>
</body>
</html>