cssAudio - ActiveCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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>
  <defs>
     <pattern id="p-1" width="200" height="200" viewBox="0 0 200 200" patternUnits="userSpaceOnUse">
      <image xlink:href="http://colourlovers.com.s3.amazonaws.com/images/patterns/3342/3342643.png" width="200" height="200"/>
    </pattern>

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

    <pattern id="p-3" width="200" height="200" viewBox="0 0 200 200" patternUnits="userSpaceOnUse">
      <image xlink:href="http://colourlovers.com.s3.amazonaws.com/images/patterns/3271/3271725.png" width="200" height="200"/>
    </pattern>

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

    <symbol id="s-wavy-path">
      <g transform="translate(-50,60)">
        <path d="M903,4.5 C903,4.5 854,42.5341344 803.148089,42.2925317 C753.981141,42.0589344 753.709827,1.76742786 703.354914,2.13371392 C653,2.49999998 652.817934,41.4339085 602.908967,41.9840226 C553,42.5341367 552.597027,1.1857595 503.173513,1.84287976 C453.75,2.50000002 452.074424,40.9050063 403.037212,41.7195701 C354,42.5341339 350.880655,2.72739994 302.940328,2.61369997 C255,2.5 253.131621,42.5536648 203.06581,42.5341357 C153,42.5146065 154,2.5 103.175781,2.5 C52.3515625,2.5 3,42.5341344 3,42.5341344"></path>
      </g>
    </symbol>

    <symbol id="s-wavy-path-vert">
      <use xlink:href="#s-wavy-path" transform=" translate(130,-30) rotate(90)"/>
    </symbol>

    <mask id="m-wavy-lines-vertical">
      <use xlink:href="#s-wavy-path-vert" x="-50" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="50" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="100" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="150" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="200" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="250" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="300" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="350" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="400" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="450" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="500" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="550" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="600" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="650" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="700" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="750" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="800" class="elem-mask"/>
      <use xlink:href="#s-wavy-path-vert" x="850" class="elem-mask"/>
    </mask>
  </defs>
  
  <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"/>
  </g>
  
</svg>
<div class="progress"></div>
            
          
!
            
              $mask-time: 7s;
$elem-mask-max: 20;
$elem-mask-step: $mask-time/$elem-mask-max;

.elem-mask {
  stroke: #FFF;
  stroke-width: 0;
  animation: stroke-width $mask-time infinite;
  
  @for $item from 2 through $elem-mask-max {
    &:nth-child(#{$elem-mask-max}n + #{$item}) {
      animation-delay: $elem-mask-step*($item - 1)*.1;
      }
    }
  }

@keyframes stroke-width {
  60% {
    stroke-width: 200;
    }
  95% {
    stroke-width: 0;
    }
  }

/* Change Image Animation
-------------------------------*/

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

.rotation__item {
  opacity: 0;
  animation: hide $duration step-end infinite;
  mask: url(#m-wavy-lines-vertical);
  
  @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
-------------------------------*/

BODY {
  background: #FFF linear-gradient(90deg, rgba(154, 205, 50,.3) 50%, rgba(154, 205, 50,.15) 50%);
  background-size: 2em 2em;
  perspective: 500px;
  perspective-origin: center center;
  }

/* Demo layers
-------------------------------*/

$rotation-height: 270px;

svg {
  width: 100%;
  height: $rotation-height;
}

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console