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 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>
    
    <linearGradient id="grad"
                    x1="15%" y1="15%" x2="85%" y2="85%">
        <stop class="stop stop--1" offset="0" stop-color="indigo"></stop>
        <stop class="stop stop--1" offset="9%" stop-color="indigo"></stop>
        
        <stop class="stop stop--2" offset="10%" stop-color="darkmagenta"></stop>
        <stop class="stop stop--2" offset="19%" stop-color="darkmagenta"></stop>
        
        <stop class="stop stop--3" offset="20%" stop-color="crimson"></stop>
        <stop class="stop stop--3" offset="29%" stop-color="crimson"></stop>
        
        <stop class="stop stop--4" offset="30%" stop-color="orangered"></stop>
        <stop class="stop stop--4" offset="39%" stop-color="orangered"></stop>
        
        <stop class="stop stop--5" offset="40%" stop-color="gold"></stop>
        <stop class="stop stop--5" offset="49%" stop-color="gold"></stop>
        
        <stop class="stop stop--6" offset="50%" stop-color="yellowgreen"></stop>
        <stop class="stop stop--6" offset="59%" stop-color="yellowgreen"></stop>
        
        <stop class="stop stop--7" offset="60%" stop-color="lightseagreen"></stop>
        <stop class="stop stop--7" offset="69%" stop-color="lightseagreen"></stop>
        
        <stop class="stop stop--8" offset="70%" stop-color="teal"></stop>
        <stop class="stop stop--8" offset="79%" stop-color="teal"></stop>
        
        <stop class="stop stop--9" offset="80%" stop-color="darkslateblue"></stop>
        <stop class="stop stop--9" offset="89%" stop-color="darkslateblue"></stop>
        
        <stop class="stop stop--10" offset="90%" stop-color="indigo"></stop>
        <stop class="stop stop--10" offset="100%" stop-color="indigo"></stop>
    </linearGradient>
    
    <symbol id="section">
        <path class="section" d="M2.04809472,114.5  L2.04809472,39.5 L1.54809472,40.3660254 L66,2.8660254 L66,77.5 Z"></path>
    </symbol>
    
    <symbol id="hex">
        <use xlink:href="#section"/>
        <use xlink:href="#section" transform="rotate(120, 66, 77.5)"/>
        <use xlink:href="#section" transform="rotate(240, 65.5, 77)"/>
    </symbol>
    
    <pattern id="pattern" 
             viewBox="2,1,127, 218"
             width="127" height="218"
             patternUnits="userSpaceOnUse">
        
        <use xlink:href="#hex"/>
        
        <use xlink:href="#hex"
             transform="translate(64, 109)"/>
        <use xlink:href="#hex"
             transform="translate(-64, 109)"/>
        
        <use xlink:href="#hex"
             transform="translate(64, -109)"/>
        <use xlink:href="#hex"
             transform="translate(-64, -109)"/>
    </pattern>
 
    <rect width="100%" height="100%" fill="url(#pattern)"></rect>
</svg>
            
          
!
            
              HTML, BODY {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    
    background: #000;
}

svg {
    width: 500px;
    height: 500px;
    // border: 1px solid #DDD;
    border-radius: 20px;
}

.section {
    fill: url(#grad);
    // stroke: black;
    // stroke-width: 2;
}

$time: 1.5s;
$max: 10;
$step: $time/$max;

.stop {
    stop-color: indigo;
    animation: colors $time infinite;
}

$colors: indigo, purple, crimson, orangered, gold, yellowgreen, lightseagreen, teal, darkslateblue, slateblue, indigo;

$step-num: 0;

@each $color in $colors {
  $step-num: $step-num + 1;  
  .stop--#{$step-num} {
    animation-delay: -$step * $step-num;
  }
}



@keyframes colors {
    0% {
        stop-color: indigo;
    }
    10% {
        stop-color: purple;
    }
    20% {
        stop-color: crimson;
    }
    30% {
        stop-color: orangered;
    }
    40% {
        stop-color: gold;
    }
    50% {
        stop-color: yellowgreen;
    }
    60% {
        stop-color: lightseagreen;
    }
    70% {
        stop-color: teal;
    }
    80% {
        stop-color: darkslateblue;
    }
    90% {
        stop-color: slateblue;
    }
    100% {
        stop-color: indigo;
    }
}
            
          
!
999px
Loading ..................

Console