Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.09 KB | None | 0 0
  1. .sk-fading-circle {
  2.   @include dimensions(40px, 45px);
  3.   @include adjust-position(null, null, relative);
  4.   margin: 100px auto;
  5. }
  6.  
  7. .sk-fading-circle .sk-circle {
  8.   @include dimensions();
  9.   @include adjust-position(0, 0);
  10. }
  11.  
  12. .sk-fading-circle .sk-circle:before {
  13.   @include dimensions(15%, 15%);
  14.   content: '';
  15.   display: block;
  16.   margin: 0 auto;
  17.   background-color: #333;
  18.   border-radius: 100%;
  19.  
  20.   @include animation(sk-circleFadeDelay 1.2s infinite ease-in-out both);
  21. }
  22.  
  23. /* starting point variables from rotation and animationDelay*/
  24. $startRotationDeg: 30;
  25. $startAnimDelay: -1.1s;
  26.  
  27. /* this code eleminates over 30 lines of code :) */
  28. @for $i from 2 through 12 {
  29.   .sk-fading-circle .sk-circle#{$i} {
  30.     @include transform (rotate($startRotationDeg + deg));
  31.     $startRotationDeg: $startRotationDeg + 30;
  32.  
  33.     &:before {
  34.       @include animation-delay($startAnimDelay);
  35.       $startAnimDelay: $startAnimDelay + 0.1;
  36.     }
  37.   }
  38. }
  39.  
  40.  
  41. @include keyframes(sk-circleFadeDelay) {
  42.  
  43.   0%,
  44.   39%,
  45.   100% {
  46.     @include opacity(0);
  47.   }
  48.  
  49.   40% {
  50.     @include opacity(1);
  51.   }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement