circle.css 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. * Usage:
  3. *
  4. * <div class="sk-circle">
  5. * <div class="sk-circle1 sk-child"></div>
  6. * <div class="sk-circle2 sk-child"></div>
  7. * <div class="sk-circle3 sk-child"></div>
  8. * <div class="sk-circle4 sk-child"></div>
  9. * <div class="sk-circle5 sk-child"></div>
  10. * <div class="sk-circle6 sk-child"></div>
  11. * <div class="sk-circle7 sk-child"></div>
  12. * <div class="sk-circle8 sk-child"></div>
  13. * <div class="sk-circle9 sk-child"></div>
  14. * <div class="sk-circle10 sk-child"></div>
  15. * <div class="sk-circle11 sk-child"></div>
  16. * <div class="sk-circle12 sk-child"></div>
  17. * </div>
  18. *
  19. */
  20. .sk-circle {
  21. margin: 40px auto;
  22. width: 40px;
  23. height: 40px;
  24. position: relative; }
  25. .sk-circle .sk-child {
  26. width: 100%;
  27. height: 100%;
  28. position: absolute;
  29. left: 0;
  30. top: 0; }
  31. .sk-circle .sk-child:before {
  32. content: '';
  33. display: block;
  34. margin: 0 auto;
  35. width: 15%;
  36. height: 15%;
  37. background-color: #333;
  38. border-radius: 100%;
  39. -webkit-animation: sk-circleBounceDelay 1.2s infinite ease-in-out both;
  40. animation: sk-circleBounceDelay 1.2s infinite ease-in-out both; }
  41. .sk-circle .sk-circle2 {
  42. -webkit-transform: rotate(30deg);
  43. -ms-transform: rotate(30deg);
  44. transform: rotate(30deg); }
  45. .sk-circle .sk-circle3 {
  46. -webkit-transform: rotate(60deg);
  47. -ms-transform: rotate(60deg);
  48. transform: rotate(60deg); }
  49. .sk-circle .sk-circle4 {
  50. -webkit-transform: rotate(90deg);
  51. -ms-transform: rotate(90deg);
  52. transform: rotate(90deg); }
  53. .sk-circle .sk-circle5 {
  54. -webkit-transform: rotate(120deg);
  55. -ms-transform: rotate(120deg);
  56. transform: rotate(120deg); }
  57. .sk-circle .sk-circle6 {
  58. -webkit-transform: rotate(150deg);
  59. -ms-transform: rotate(150deg);
  60. transform: rotate(150deg); }
  61. .sk-circle .sk-circle7 {
  62. -webkit-transform: rotate(180deg);
  63. -ms-transform: rotate(180deg);
  64. transform: rotate(180deg); }
  65. .sk-circle .sk-circle8 {
  66. -webkit-transform: rotate(210deg);
  67. -ms-transform: rotate(210deg);
  68. transform: rotate(210deg); }
  69. .sk-circle .sk-circle9 {
  70. -webkit-transform: rotate(240deg);
  71. -ms-transform: rotate(240deg);
  72. transform: rotate(240deg); }
  73. .sk-circle .sk-circle10 {
  74. -webkit-transform: rotate(270deg);
  75. -ms-transform: rotate(270deg);
  76. transform: rotate(270deg); }
  77. .sk-circle .sk-circle11 {
  78. -webkit-transform: rotate(300deg);
  79. -ms-transform: rotate(300deg);
  80. transform: rotate(300deg); }
  81. .sk-circle .sk-circle12 {
  82. -webkit-transform: rotate(330deg);
  83. -ms-transform: rotate(330deg);
  84. transform: rotate(330deg); }
  85. .sk-circle .sk-circle2:before {
  86. -webkit-animation-delay: -1.1s;
  87. animation-delay: -1.1s; }
  88. .sk-circle .sk-circle3:before {
  89. -webkit-animation-delay: -1s;
  90. animation-delay: -1s; }
  91. .sk-circle .sk-circle4:before {
  92. -webkit-animation-delay: -0.9s;
  93. animation-delay: -0.9s; }
  94. .sk-circle .sk-circle5:before {
  95. -webkit-animation-delay: -0.8s;
  96. animation-delay: -0.8s; }
  97. .sk-circle .sk-circle6:before {
  98. -webkit-animation-delay: -0.7s;
  99. animation-delay: -0.7s; }
  100. .sk-circle .sk-circle7:before {
  101. -webkit-animation-delay: -0.6s;
  102. animation-delay: -0.6s; }
  103. .sk-circle .sk-circle8:before {
  104. -webkit-animation-delay: -0.5s;
  105. animation-delay: -0.5s; }
  106. .sk-circle .sk-circle9:before {
  107. -webkit-animation-delay: -0.4s;
  108. animation-delay: -0.4s; }
  109. .sk-circle .sk-circle10:before {
  110. -webkit-animation-delay: -0.3s;
  111. animation-delay: -0.3s; }
  112. .sk-circle .sk-circle11:before {
  113. -webkit-animation-delay: -0.2s;
  114. animation-delay: -0.2s; }
  115. .sk-circle .sk-circle12:before {
  116. -webkit-animation-delay: -0.1s;
  117. animation-delay: -0.1s; }
  118. @-webkit-keyframes sk-circleBounceDelay {
  119. 0%, 80%, 100% {
  120. -webkit-transform: scale(0);
  121. transform: scale(0); }
  122. 40% {
  123. -webkit-transform: scale(1);
  124. transform: scale(1); } }
  125. @keyframes sk-circleBounceDelay {
  126. 0%, 80%, 100% {
  127. -webkit-transform: scale(0);
  128. transform: scale(0); }
  129. 40% {
  130. -webkit-transform: scale(1);
  131. transform: scale(1); } }