circle.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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-circle {
  13. width: 40px;
  14. height: 40px;
  15. position: relative;
  16. }
  17. .sk-circle .sk-child {
  18. width: 100%;
  19. height: 100%;
  20. position: absolute;
  21. left: 0;
  22. top: 0;
  23. }
  24. .sk-circle .sk-child: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-circleBounceDelay 1.2s infinite ease-in-out both;
  33. animation: sk-circleBounceDelay 1.2s infinite ease-in-out both;
  34. }
  35. .sk-circle .sk-circle2 {
  36. -webkit-transform: rotate(30deg);
  37. -ms-transform: rotate(30deg);
  38. transform: rotate(30deg); }
  39. .sk-circle .sk-circle3 {
  40. -webkit-transform: rotate(60deg);
  41. -ms-transform: rotate(60deg);
  42. transform: rotate(60deg); }
  43. .sk-circle .sk-circle4 {
  44. -webkit-transform: rotate(90deg);
  45. -ms-transform: rotate(90deg);
  46. transform: rotate(90deg); }
  47. .sk-circle .sk-circle5 {
  48. -webkit-transform: rotate(120deg);
  49. -ms-transform: rotate(120deg);
  50. transform: rotate(120deg); }
  51. .sk-circle .sk-circle6 {
  52. -webkit-transform: rotate(150deg);
  53. -ms-transform: rotate(150deg);
  54. transform: rotate(150deg); }
  55. .sk-circle .sk-circle7 {
  56. -webkit-transform: rotate(180deg);
  57. -ms-transform: rotate(180deg);
  58. transform: rotate(180deg); }
  59. .sk-circle .sk-circle8 {
  60. -webkit-transform: rotate(210deg);
  61. -ms-transform: rotate(210deg);
  62. transform: rotate(210deg); }
  63. .sk-circle .sk-circle9 {
  64. -webkit-transform: rotate(240deg);
  65. -ms-transform: rotate(240deg);
  66. transform: rotate(240deg); }
  67. .sk-circle .sk-circle10 {
  68. -webkit-transform: rotate(270deg);
  69. -ms-transform: rotate(270deg);
  70. transform: rotate(270deg); }
  71. .sk-circle .sk-circle11 {
  72. -webkit-transform: rotate(300deg);
  73. -ms-transform: rotate(300deg);
  74. transform: rotate(300deg); }
  75. .sk-circle .sk-circle12 {
  76. -webkit-transform: rotate(330deg);
  77. -ms-transform: rotate(330deg);
  78. transform: rotate(330deg); }
  79. .sk-circle .sk-circle2:before {
  80. -webkit-animation-delay: -1.1s;
  81. animation-delay: -1.1s; }
  82. .sk-circle .sk-circle3:before {
  83. -webkit-animation-delay: -1s;
  84. animation-delay: -1s; }
  85. .sk-circle .sk-circle4:before {
  86. -webkit-animation-delay: -0.9s;
  87. animation-delay: -0.9s; }
  88. .sk-circle .sk-circle5:before {
  89. -webkit-animation-delay: -0.8s;
  90. animation-delay: -0.8s; }
  91. .sk-circle .sk-circle6:before {
  92. -webkit-animation-delay: -0.7s;
  93. animation-delay: -0.7s; }
  94. .sk-circle .sk-circle7:before {
  95. -webkit-animation-delay: -0.6s;
  96. animation-delay: -0.6s; }
  97. .sk-circle .sk-circle8:before {
  98. -webkit-animation-delay: -0.5s;
  99. animation-delay: -0.5s; }
  100. .sk-circle .sk-circle9:before {
  101. -webkit-animation-delay: -0.4s;
  102. animation-delay: -0.4s; }
  103. .sk-circle .sk-circle10:before {
  104. -webkit-animation-delay: -0.3s;
  105. animation-delay: -0.3s; }
  106. .sk-circle .sk-circle11:before {
  107. -webkit-animation-delay: -0.2s;
  108. animation-delay: -0.2s; }
  109. .sk-circle .sk-circle12:before {
  110. -webkit-animation-delay: -0.1s;
  111. animation-delay: -0.1s; }
  112. @-webkit-keyframes sk-circleBounceDelay {
  113. 0%, 80%, 100% {
  114. -webkit-transform: scale(0);
  115. transform: scale(0);
  116. } 40% {
  117. -webkit-transform: scale(1);
  118. transform: scale(1);
  119. }
  120. }
  121. @keyframes sk-circleBounceDelay {
  122. 0%, 80%, 100% {
  123. -webkit-transform: scale(0);
  124. transform: scale(0);
  125. } 40% {
  126. -webkit-transform: scale(1);
  127. transform: scale(1);
  128. }
  129. }
  130. </style>
  131. <div class="sk-circle">
  132. <div class="sk-circle1 sk-child"></div>
  133. <div class="sk-circle2 sk-child"></div>
  134. <div class="sk-circle3 sk-child"></div>
  135. <div class="sk-circle4 sk-child"></div>
  136. <div class="sk-circle5 sk-child"></div>
  137. <div class="sk-circle6 sk-child"></div>
  138. <div class="sk-circle7 sk-child"></div>
  139. <div class="sk-circle8 sk-child"></div>
  140. <div class="sk-circle9 sk-child"></div>
  141. <div class="sk-circle10 sk-child"></div>
  142. <div class="sk-circle11 sk-child"></div>
  143. <div class="sk-circle12 sk-child"></div>
  144. </div>
  145. <%= options.dev ? '<!-- http://tobiasahlin.com/spinkit -->' : '' %>