cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <svg viewBox="0 0 120 120" class="svg-preloader">
  	<symbol viewBox="0 0 287 273" id="s-star">
      	<g transform="scale(.2)">
          <polygon id="Star" points="143.5 214.088827 55.0383195 272.257058 83.0234317 170.150028 0.365994298 103.992942 106.123425 99.0555583 143.5 0 180.876575 99.0555583 286.634006 103.992942 203.976568 170.150028 231.96168 272.257058 "></polygon>
         </g>	
    </symbol>  
    
   <rect class="r-bounds" width="100%" height="100%"/>
    <g class="g-stars">
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>  
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
      <g class="g-star">
      	<use xlink:href="#s-star" class="u-star"/>
      </g>
    </g>
  </svg>

            
          
!
            
              $max: 12;
$size: 120px;
$fill: orangered;
$angle: 360/$max;

.r-bounds {
  fill: none;
  stroke: #AAA;
	}

.svg-preloader {
  height: $size;
  width: $size;
  }

.g-stars {
  fill: $fill;
  }

.g-star {
  transform-origin: $size/2 $size/2;
  animation: 1.2s linear infinite;
  animation-name: colors, opacity;
  
  @for $item from 1 through $max {
    &:nth-child(#{$max}n + #{$item}){
      transform: rotate(#{-$angle*$item}deg) translate(10px, 10px) scale(.85);
	   animation-delay: -#{$item/10}s;
    }
  }
}

.u-star {
  transform-origin: 15px 15px;
  animation: 1.2s linear infinite;
  animation-name: transform;
}

.g-star {
  @for $item from 1 through $max {
    &:nth-child(#{$max}n + #{$item}) .u-star {
	   animation-delay: -#{$item/10}s;
    }
  }
}

@keyframes opacity {
  0% {
    fill-opacity: 1;
  }
  75% {
    fill-opacity: 0;
  }
  80% {
    fill-opacity: 0;
  }
}

@keyframes colors {
  0% {
    fill: orangered;
    }
  50% {
    fill: teal;
  }
}

@keyframes transform {
  50% {
    transform: scale(.4) translate(15px,15px);
  }
  75% {
    transform: scale(1.5) translate(0,0);
  }
}
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console