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.

              <div class="l-wrapper">
      <pattern id="p-1" width="200" height="200" viewBox="0 0 200 200" patternUnits="userSpaceOnUse">
        <image xlink:href="https://colourlovers.com.s3.amazonaws.com/images/patterns/3342/3342643.png" width="200" height="200"/>

      <pattern id="p-2" width="200" height="200" viewBox="0 0 200 200" patternUnits="userSpaceOnUse">
        <image xlink:href="https://colourlovers.com.s3.amazonaws.com/images/patterns/2617/2617226.png" width="200" height="200"/>

      <pattern id="p-3" width="200" height="200" viewBox="0 0 200 200" patternUnits="userSpaceOnUse">
        <image xlink:href="https://colourlovers.com.s3.amazonaws.com/images/patterns/3271/3271725.png" width="200" height="200"/>
      <pattern id="p-4" width="200" height="200" viewBox="0 0 200 200" patternUnits="userSpaceOnUse">
        <image xlink:href="https://colourlovers.com.s3.amazonaws.com/images/patterns/2617/2617452.png" width="200" height="200"/>
      <pattern id="p-wave" width="204" height="270" viewBox="3 0 198 204" patternUnits="userSpaceOnUse">
         <g transform="translate(0, 80)">
           <path d="M201.940328,1.61369997 C154,1.5 152.131621,41.5536648 102.06581,41.5341357 C52,41.5146065 53,1.5 2.17578125,1.5" fill="none" class="elem-mask"/>
      <mask id="m-line">
        <rect width="100%" height="100%" fill="url(#p-wave)"/>
    <g class="rotation">
      <rect width="100%" height="100%" fill="url(#p-1)" class="rotation__item" />
      <rect width="100%" height="100%" fill="url(#p-2)" class="rotation__item"/>
      <rect width="100%" height="100%" fill="url(#p-3)" class="rotation__item"/>
      <rect width="100%" height="100%" fill="url(#p-4)" class="rotation__item"/>
  <div class="progress"></div>
              /* Mask Animation
$mask-duration: 4s;

.elem-mask {
  stroke: white;
  stroke-width: 0;
  animation: stroke-width $mask-duration infinite;

@keyframes stroke-width {
  50% {
    stroke-width: 290;

/* Change Image Animation

$max: 4;
$duration: $mask-duration*$max;
$step: $duration/$max;
$step-perc: percentage(1/$max);

.rotation__item {
  mask: url(#m-line);
  opacity: 0;
  animation: hide $duration step-end infinite;
  border: 1px solid transparent;
  @for $item from 2 through $max {
    &:nth-child(#{$max}n + #{$item}){
    animation-delay: $step*($item - 1);

@keyframes hide {
  0% {
    opacity: 1;
  #{$step-perc} {
    opacity: 0;

/* Progress Bar

.progress {
  width: 0;
  height: 5px;
  background: rgba(154, 205, 50,.5);
  animation: timer $duration infinite linear;

@keyframes timer {
  100% {
    width: 100%;

/* Common

  background: #FFF linear-gradient(90deg, rgba(154, 205, 50,.3) 50%, rgba(154, 205, 50,.15) 50%);
  background-size: 2em 2em;

/* Demo layers

$rotation-height: 270px;

svg {
  display: inline-block;
  width: 100%;
  height: $rotation-height;

🕑 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 ..................