cssAudio - Activefile-genericCSS - 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.

            
              <div class="svg-container">
  <div class="svg-1">
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1082.1 1785.3" style="enable-background:new 0 0 1082.1 1785.3;" xml:space="preserve">
  <style type="text/css">
    .st0{fill-rule:evenodd;clip-rule:evenodd;fill:indianred;}
  </style>
  <g>
    <path id="XMLID_56_" class="st0" d="M128.8,835l103.4,26.9c0,0,49.4-178.2,175.1-132.5c125.7,45.7,224.4-35.2,224.4-35.2
      c37.2,144.1-162.8,217-370.9,374.3c-101.1,76.4-100,364-100,364L964,1432c-3.2-4.6-54-110.1-56.7-242.1
      c-2.7-127.4,104-321.3,91.7-603.1S659.7,226.1,659.7,226.1c68.7-67.3-99-189.9-99-189.9v201c-180.1,11.9-253.9,121-253.9,121
      l24,79.3c0,0-226,201.8-283.3,246.9c-57.3,45.1,25.3,167,25.3,167L128.8,835z"/>
    <path id="XMLID_53_" class="st0" d="M999.3,1501.8L999.3,1501.8c0-12.1-9.9-22-22-22H157.8c-12.1,0-22,9.9-22,22l0,0
      c0,12.1,9.9,22,22,22h819.5C989.4,1523.8,999.3,1513.9,999.3,1501.8z"/>
    <path id="XMLID_55_" class="st0" d="M1051.6,1729.2l-46.4-141c0-7.7-6.3-13.9-13.9-13.9H155.6c-7.7,0-13.9,6.3-13.9,13.9l-46.4,141
      c0,7.7,6.3,13.9,13.9,13.9h928.5C1045.4,1743.1,1051.6,1736.8,1051.6,1729.2z"/>
  </g>
  </svg>
</div>
  <div class="svg-2">
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1082.1 1785.3" style="enable-background:new 0 0 1082.1 1785.3;" xml:space="preserve">
<style type="text/css">
	.st3{fill-rule:evenodd;clip-rule:evenodd;fill:slategrey;}
</style>
<g>
	<path class="st3" d="M204.6,709l-85.9,66.4l-0.4-10l-4.8-20l-16.8-39.2l-9.3-24.6l-3.3-14.8l-0.4-9.9l0.2-5.1l2.1-10l4.2-10.2
		l6.3-10.1l4.1-5.3l45.3-33.6l48.8-49l42.8-54.4l56.1-79.7l41.6-55.8l46.6-51.5l24.8-23.5l1-0.7l1.3-1.3l5.5-3.3l4.2-2.8l1.7-0.8
		l3.2-1.9l11.6-4.6l5.9-2.6l2-0.5l1.4-0.6l5.5-1.2l19.5-5.1l29.9-6.1l22.1-4.9l7.2-2.1l15.4-5.9l8.1-4.6l-5.8-4.4l-5.8-3l-4.1-1.3
		l-8.5-1.1l-8.4,0.2l-26,5.9l-8.4,2l1-1.8l2.6-3.1l3.2-2.4l5.2-2.7l19.5-5.6l5.4-2.2l3-2l2.6-2.2l2.2-3l0.9-1.8l1.1-4.1l0.4-5
		l-2.1-4.2l-1.8-6.3l-0.4-6.4l1.1-8.6l7.6-30.6l0.4-9.4l-0.6-4.8l8.8,7.2l21.1,24.5l57.7,83.1l-2.7-28.2l-6.2-29.6l-9.9-29.6
		l-13.2-28.5L576,84.8l-18.8-22.1L667.7,176l2.2,7.2l0.4,10.1l-1.1,6.6l-1.9,6.2l-10.3,19.7l-6.9,13.6l-2.1,8.1l-0.3,5.5l1.1,5.5
		l2.3,5.7l4.3,5.9l6.1-2.6l3.7-2.2l3.2-2.6l6.7-7.9l16.2-25.5l2.8-3.5l6.7-6.1l2.4,6.1l2.6,12.3l0.4,12l-2.8,18.2l-13.1,36.3
		L675.7,341l-4.3,18.2l-1.1,12.2l1.1,12.5l3.2,12.3l6.3,12.5l4.3,6.4l71.9-155.1l-2.6,27.6l-7.8,28.3l-24,62.6l-8.8,32.9l-1.3,12.7
		l0.7,12l2.8,11.6l5,11.2l7.7,10.5l0.9-22.8l4.6-22.2l11.7-31.9l25-52.6l15.8-37.7l1.7-5.4l3.7,0.2l3.2,0.9l2.6,1.8l1.1,1.1l2.5,4.1
		l1.3,3.5l1.3,7.8l-0.8,17.5l-2.4,11.8l-8.4,22.2l-26,47.3L753,443.3l-5.2,19.1l-0.9,9.7l0.5,9.6l1.9,9.8l3.4,9.9l35.2-48.4l35-49.5
		l21.7-37.5l7.4-17.3l4.7,17.7l0.9,17.1l-2.8,16.9l-5.4,16.5l-12.9,24.5l-29.6,40.1l-45.3,55.8l-20.8,32.7l-7.6,16.6l-4.8,16.9
		l-1.3,8.5l1.8,3.3l2.6,1.8l3.3,0.4l3.6-1.2l9.3-5.8l23.3-24.5l34.5-46.7l34.8-53.7l37.7-65.9l10.2-21.9l0.9-2.9l4.1,5.3l2.6,6.2
		l1.5,9l-0.3,9.4l-2.8,15.1l-10.2,33.7l-9.9,21.9L839.9,550l-45.1,66.3l-6,10.6l-2.4,6.9l0.4,1.7l1.8,0.4l2.8-0.8l10.1-5.9
		l54.6-44.9l22.2-25.9l23.1-37.9l25.7-56.8l9.9,28.5l2.2,13l0.4,12l-1.1,11.4l-2.7,10.7l-4,10l-11.8,18.2l-16,16.4l-30.5,21.3
		l-85,43.6l-46.9,25.6l-28.9,22.2l-14.8,17l-5.8,9.2l-4.6,9.9l11-7.9l38.2-18.6l68.9-27.6l51.1-23.7l37.3-23.1l23.4-20.5l13-15.6
		l9.7-17.2l6.9-18.5l2.2,7.7l0.4,5.3l-0.9,8.3l-2.2,8.3l-6.2,13.8l-14.1,21.9L890,672.2l-24.6,22.6l-36.7,24.5l-69.5,35.5
		l-48.3,26.1l-26.7,18.8l-16.4,14.5l-21.6,25.6l-12.3,20.1l1.1,3.8l0.2,4.1l-0.4,4.2l-9.5,27l-1.1,4.1l-0.5,6l0.6,3.5l0.7,1.8l2.4,3
		l3.4,2.7l2.2,1.1l2.6,0.9l48.3-48.2l49.7-38.3l78.8-49.3l56.1-35.1l43.2-33.1l23.8-23L918,725.7l-20.5,26.6l-31.2,29.6l-43.6,31.1
		l-82.3,49.3l-43.1,30.5l-23.8,21l-38.6,53.7l-23.1,41l-13.3,34.4l0.6,0.5l5.2-2.6l71-53.3L797,888.9l94.6-81.7l-33,40.8l-57.9,54.6
		l-79.4,70.1l-42.5,48l-20.6,32l-15.2,35.5l-9.1,39.4l42.7-42.9l91.5-91.1l64.1-59.8l33.9-27.4l-4.1,14.6l-6.5,13.2l-8.4,11.9
		l-17.3,18.2l-40.1,35.4l-19.2,20.6l-29.5,40.7l-41.7,59.4l-19.4,34.2l-12.3,28.7l-8.5,30l-3.6,32.2v17.1l47.5-88.7l30.2-52.2
		l79.3-77.1l-17.7,36.6l-14.7,40.1l-9.8,42.3l-2.8,25.6l0.9,33.7l4.3,24.5l8.2,23.7l12.3,22.1l5.2,7.1l3,0.4l2.8-0.1l2.6-1.2
		l2.2-1.8l3.9-5.4l1.7-3.7l6.3-25.8l10.7-65.3l8.4-30.3l5.6-14l11-18.8l9.5-10.8l-3.9,51.7l1.5,52.1l4.6,48.2l1.1,8.7l7.5-2.4
		l5.8-3.3l2.4-2l3.7-4.6l1.5-2.4l2.8-8.2l0.8-6l-0.8-37.6l0.1-6.9l1.1-6.5l1.7-6.3l3-5.9l8,30.6l2.4,26.3l-1.7,32.8l-2.1,12.5
		l-21.6,17.3l-39.7,22.4l-63.4,23.6l-29.5,6.7l-5.7,1.8l-56.8,14.2l-66,11.8l-74,7.1l-47.9,0.6l-85-5.7l-35.4-5.3l-59.8-23.9
		l-50.1-29.3l-30.8-25.4l-24.4-28.8l-12.5-20.5l-9.7-21.9l-6.2-23.4l-2.8-24.6l0.4-25.8l4.1-27.4l13.1-43.1l21.8-46l93.7-102.8
		l94.3-103l44-52.4l40.6-53.7l22.2-32l19.5-21.3l8.3-9.1l13.8-17.5l2.6-3.4l7.2-14.2l2.6-11.3l-0.2-7.7l-1.7-8l-1.3-3.9l-4.5-8.3
		L530,635.4L507,652.5l-22,10.7l-26.6,7.5l-20.5,2.4l-11.2,0.3l-37.5-3.1l-44.3-10.5l-70.1-27.6l-1.3,2.4l-1,5.3l0.7,4.8l2.3,4.8
		l3.5,4.8l4.7,4.4l12.5,8.1l18.7,8.1l19.9,5.7l17.9,2.4l3,0.2l3-0.2l-1.1,2.1l-3.2,4l-2.1,1.8l-8.4,4.4l-10.4,3.5l-16.2,2.2h-8.6
		l-13.1-1.3l-8.5-2l-11.8-4.7l-7-4.4L262,683l-5-6.4l-2.2-3.7l-1.4-4L204.6,709z M989.1,1429.4l-154.4,22.3L688,1474.1l-93.9,9.8
		l-99.3,4.2l-106.5-3.7l-98.2-10.6l-60.4-11.4l-36.9-10.6l-30.2-12.5l-14.3-8.6l-0.8,2.6l-2.6,4l-1.6,1.4l-3.2,1.7l-3.7,0.8
		l-3.9,0.5l-5.4,1.4l-1.8,0.8l-2.8,2.7l34.3,19.3l42.3,15.8l104.9,22.1l157.3,11.4H495l170.8-8.1l163-22.4l137.9-34.4l63.6-25.4
		L989.1,1429.4z M167.4,1417.4l17.2,4l5.4,2.2l9.1,5l6.3,4.9l50,8.7l125.8,16.2l125.6,7.2l124.7-3.7l122.3-16.4l119.2-30.2l115-46.3
		L879,1395.2l-128.5,23l-138.3,16l-139,5.4l-130.6-8.5l-91.9-19.3l-58.7-23l-22.7,22.7l-2.5,3.4l-0.2,0.9v0.5l0.2,0.7L167.4,1417.4z
		 M255.7,774.3l3.7-9l17.5-30.7l6.1-13.8l-4.3-3.1l-8.7-4.7l-8.5-2.5l-8.4-1.2l-12.1,1.6l-12.1,4.3l-11.4,6.6l-22.3,17l-32.8,28.1
		l33,13.6l34.3,10.3l17.5,2h6.1l-0.3-2.4l0.7-9.4L255.7,774.3z M436.3,354.6l-3.5,3.9l-10,13.1L405.3,400l-17.1,28.2l4.2-0.4
		l3.9-1.4l5.2-3.2l15.8-15l4.9-3.7l5.2-2.8l1.8-0.5l4-0.4l4.3,0.6l7.2,3.1l2.5,1.7l4.2-5l3.9-8.4l5.5-20.6l25,5.2l10.8,1.2l4.9-0.2
		l2.4-0.5l0.4-9l-0.5-2.6l-1-2"/>
	<polyline class="st3" points="1030,1580.1 1008.3,1589.7 975.5,1600.2 925.7,1611.5 876.5,1622.2 895.2,1624.9 909.6,1625.7 
		919.1,1625.7 943.1,1624.2 989.2,1617.2 1022.3,1610.9 986.1,1628.1 955,1638.8 928.8,1645.5 898.1,1651.1 862.2,1655.5 
		868.6,1658.7 871.9,1659.8 878.7,1661.6 889.5,1662.8 900.8,1662.8 935.2,1660.4 950.2,1660.8 957.2,1661.9 964.3,1663.7 
		971.1,1666.6 977.7,1670.4 972.2,1677.3 961.2,1686.7 947.1,1695 924.5,1704.9 891.7,1715.2 841.5,1727 785.2,1738.1 698.8,1744.6 
		629.6,1745.8 542.7,1743.1 456.1,1737.2 301,1721.8 232.7,1714.5 176.9,1702.9 158.6,1698.3 146.9,1694 143.4,1692.4 134.6,1686.7 
		129.7,1682 126.2,1676.5 122.9,1666.4 122.5,1654.1 123.1,1649.4 135.2,1652.4 149.8,1654.8 162.1,1655.5 167.6,1655.5 
		174.7,1654.9 178.7,1654.2 180.4,1653.9 184.8,1652.2 187.9,1650.5 189.3,1649.1 189.7,1648.5 189.9,1647.8 189.9,1646.4 
		189.7,1645.8 187.1,1643.6 183.8,1641.8 167,1635.6 147.6,1629.2 136.5,1623.7 129.1,1617.9 124.6,1612.4 121.3,1580.4 
		117.4,1547.4 118.2,1521 121.3,1507.8 179.6,1519.9 239.1,1527.8 299.7,1532.5 410.2,1536.9 531.2,1541.1 647.7,1538.7 
		763.8,1533.3 880.7,1527.3 911.1,1525.9 961.2,1519.8 1009.7,1510.5 1038.4,1504.2 1034.2,1528 1033.5,1561.2 	"/>
</g>
</svg>
</div>
</div>

<div class="ui center aligned container">
  <div class="ui teal button onion">Toggle onion skin</div>
</div>

            
          
!
            
              body {
  background: Gainsboro;
}
.svg-container {
  height: 310px;
  [class*=svg-] {
    display: inline-block;
    position: absolute;
    // transitioning all, as we're catching 
    // 2 transitions here
    transition: all ease-out 0.3s;
    height: 286px;
    width: 173px;
    &:nth-child(odd) {
      // positioning is placement - half 
      // the width of your target
      left: calc(60% - 86px);
      @media (max-width: 500px) {
        left: 10px;
      }   
    }
    &:nth-child(even) {
      left: calc(40% - 86px);
      @media (max-width: 500px) {
        left: calc(95% - 173px);
      }       
    }
    &.svg-onion {
      left: calc(50% - 86px);
       svg {
        // nested here to only affect opacity
        // when .svg-onion is added
        fill-opacity: .6;
      }     
    }
  }
}

            
          
!
            
              $('.onion')
.on(
  'click',
  function() {
    $('[class*=svg-]').toggleClass('svg-onion');
  }
);
            
          
!
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