Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 1.08 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.   @include animation(sk-circleFadeDelay 1.2s infinite ease-in-out both);
  20. }
  21.  
  22. /* starting point variables from rotation and animationDelay*/
  23. $startRotationDeg: 30;
  24. $startAnimDelay: -1.1s;
  25.  
  26. /* this code eleminates over 30 lines of code :) */
  27. @for $i from 2 through 12 {
  28.   .sk-fading-circle .sk-circle#{$i} {
  29.     @include transform (rotate($startRotationDeg + deg));
  30.     $startRotationDeg: $startRotationDeg + 30;
  31.  
  32.     &:before {
  33.       @include animation-delay($startAnimDelay);
  34.       $startAnimDelay: $startAnimDelay + 0.1;
  35.     }
  36.   }
  37. }
  38.  
  39.  
  40. @include keyframes(sk-circleFadeDelay) {
  41.   0%,
  42.   39%,
  43.   100% {
  44.     @include opacity(0);
  45.   }
  46.  
  47.   40% {
  48.     @include opacity(1);
  49.   }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement