fading-circle.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <style>
  2. body, html, #<%= globals.id %> {
  3. background: <%= options.background %>;
  4. width: 100%;
  5. height: 100%;
  6. display: flex;
  7. justify-content: center;
  8. align-items: center;
  9. margin: 0;
  10. padding: 0;
  11. }
  12. .sk-fading-circle {
  13. width: 40px;
  14. height: 40px;
  15. position: relative;
  16. }
  17. .sk-fading-circle .sk-circle {
  18. width: 100%;
  19. height: 100%;
  20. position: absolute;
  21. left: 0;
  22. top: 0;
  23. }
  24. .sk-fading-circle .sk-circle:before {
  25. content: '';
  26. display: block;
  27. margin: 0 auto;
  28. width: 15%;
  29. height: 15%;
  30. background-color: <%= options.color %>;
  31. border-radius: 100%;
  32. -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
  33. animation: sk-circleFadeDelay 1.2s infinite ease-in-out both;
  34. }
  35. .sk-fading-circle .sk-circle2 {
  36. -webkit-transform: rotate(30deg);
  37. -ms-transform: rotate(30deg);
  38. transform: rotate(30deg);
  39. }
  40. .sk-fading-circle .sk-circle3 {
  41. -webkit-transform: rotate(60deg);
  42. -ms-transform: rotate(60deg);
  43. transform: rotate(60deg);
  44. }
  45. .sk-fading-circle .sk-circle4 {
  46. -webkit-transform: rotate(90deg);
  47. -ms-transform: rotate(90deg);
  48. transform: rotate(90deg);
  49. }
  50. .sk-fading-circle .sk-circle5 {
  51. -webkit-transform: rotate(120deg);
  52. -ms-transform: rotate(120deg);
  53. transform: rotate(120deg);
  54. }
  55. .sk-fading-circle .sk-circle6 {
  56. -webkit-transform: rotate(150deg);
  57. -ms-transform: rotate(150deg);
  58. transform: rotate(150deg);
  59. }
  60. .sk-fading-circle .sk-circle7 {
  61. -webkit-transform: rotate(180deg);
  62. -ms-transform: rotate(180deg);
  63. transform: rotate(180deg);
  64. }
  65. .sk-fading-circle .sk-circle8 {
  66. -webkit-transform: rotate(210deg);
  67. -ms-transform: rotate(210deg);
  68. transform: rotate(210deg);
  69. }
  70. .sk-fading-circle .sk-circle9 {
  71. -webkit-transform: rotate(240deg);
  72. -ms-transform: rotate(240deg);
  73. transform: rotate(240deg);
  74. }
  75. .sk-fading-circle .sk-circle10 {
  76. -webkit-transform: rotate(270deg);
  77. -ms-transform: rotate(270deg);
  78. transform: rotate(270deg);
  79. }
  80. .sk-fading-circle .sk-circle11 {
  81. -webkit-transform: rotate(300deg);
  82. -ms-transform: rotate(300deg);
  83. transform: rotate(300deg);
  84. }
  85. .sk-fading-circle .sk-circle12 {
  86. -webkit-transform: rotate(330deg);
  87. -ms-transform: rotate(330deg);
  88. transform: rotate(330deg);
  89. }
  90. .sk-fading-circle .sk-circle2:before {
  91. -webkit-animation-delay: -1.1s;
  92. animation-delay: -1.1s;
  93. }
  94. .sk-fading-circle .sk-circle3:before {
  95. -webkit-animation-delay: -1s;
  96. animation-delay: -1s;
  97. }
  98. .sk-fading-circle .sk-circle4:before {
  99. -webkit-animation-delay: -0.9s;
  100. animation-delay: -0.9s;
  101. }
  102. .sk-fading-circle .sk-circle5:before {
  103. -webkit-animation-delay: -0.8s;
  104. animation-delay: -0.8s;
  105. }
  106. .sk-fading-circle .sk-circle6:before {
  107. -webkit-animation-delay: -0.7s;
  108. animation-delay: -0.7s;
  109. }
  110. .sk-fading-circle .sk-circle7:before {
  111. -webkit-animation-delay: -0.6s;
  112. animation-delay: -0.6s;
  113. }
  114. .sk-fading-circle .sk-circle8:before {
  115. -webkit-animation-delay: -0.5s;
  116. animation-delay: -0.5s;
  117. }
  118. .sk-fading-circle .sk-circle9:before {
  119. -webkit-animation-delay: -0.4s;
  120. animation-delay: -0.4s;
  121. }
  122. .sk-fading-circle .sk-circle10:before {
  123. -webkit-animation-delay: -0.3s;
  124. animation-delay: -0.3s;
  125. }
  126. .sk-fading-circle .sk-circle11:before {
  127. -webkit-animation-delay: -0.2s;
  128. animation-delay: -0.2s;
  129. }
  130. .sk-fading-circle .sk-circle12:before {
  131. -webkit-animation-delay: -0.1s;
  132. animation-delay: -0.1s;
  133. }
  134. @-webkit-keyframes sk-circleFadeDelay {
  135. 0%, 39%, 100% { opacity: 0; }
  136. 40% { opacity: 1; }
  137. }
  138. @keyframes sk-circleFadeDelay {
  139. 0%, 39%, 100% { opacity: 0; }
  140. 40% { opacity: 1; }
  141. }
  142. </style>
  143. <div class="sk-fading-circle">
  144. <div class="sk-circle1 sk-circle"></div>
  145. <div class="sk-circle2 sk-circle"></div>
  146. <div class="sk-circle3 sk-circle"></div>
  147. <div class="sk-circle4 sk-circle"></div>
  148. <div class="sk-circle5 sk-circle"></div>
  149. <div class="sk-circle6 sk-circle"></div>
  150. <div class="sk-circle7 sk-circle"></div>
  151. <div class="sk-circle8 sk-circle"></div>
  152. <div class="sk-circle9 sk-circle"></div>
  153. <div class="sk-circle10 sk-circle"></div>
  154. <div class="sk-circle11 sk-circle"></div>
  155. <div class="sk-circle12 sk-circle"></div>
  156. </div>
  157. <%= options.dev ? '<!-- http://tobiasahlin.com/spinkit -->' : '' %>