css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 171.7 202.7" id="face-card">
  <style>
    .st0{fill:#F26522;} .st1{display:none;opacity:0.33;fill:#D64912;} .st2{opacity:0.33;fill:#D64912;} .st3{fill:#8DC63F;} .st4{opacity:0.4;fill:#8BAF3E;} .st5{opacity:0.36;} .st6{fill:#34495E;} .st7{fill:#9B64B5;} .st8{fill:#8E4FB2;} .st9{fill:#8D5FAF;} .st10{fill:#C0392C;} .st11{fill:#E23D3D;} .st12{fill:#1ABC9C;} .st13{fill:#1FCCAA;} .st14{fill:#E74C3C;} .st15{fill:#D14039;} .st16{fill:#9E1F63;} .st17{fill:#F39C12;} .st18{fill:none;stroke:#F39C12;stroke-width:6;stroke-miterlimit:10;} .st19{fill:#2C3E50;} .st20{fill:#F1C40E;} .st21{display:none;} .st22{display:inline;} .st23{fill:#F1F2F2;} .st24{fill:#17A085;} .st25{opacity:0.16;} .st26{opacity:0.6;} .st27{opacity:0.24;fill:#D1D3D4;} .st28{fill:#8E44AD;}
  </style>
  <g id="Faces">
    <g id="Face_5">
      <path id="XMLID_273_" class="st0" d="M112 60.8v-8.2c-.6-14-12.1-25.1-26.2-25.1S60.1 38.6 59.5 52.6v7.5c-21.8 10-37 20.4-37 45.9 0 34.9 28.3 83.3 63.2 83.3S149 142 149 107.1c0-25.6-15.2-36.3-37-46.3z"/>
      <path id="XMLID_150_" class="st1" d="M148.4 116.9c-5.2 2.9-15.4 6-21 9.7-9.7 6.8-16.3 38.8-21 57.2 0 0 8-9.5 21-31.1s21-35.8 21-35.8z"/>
      <path id="XMLID_153_" class="st1" d="M23.6 116.9c5.2 2.9 15.4 6 21 9.7 9.7 6.8 16.3 38.8 21 57.2 0 0-8-9.5-21-31.1s-21-35.8-21-35.8z"/>
      <path id="XMLID_275_" class="st2" d="M76.3 29.3s-9.6 64.2-11.4 77.6c-30.3-31.1-37.5-3.8-42.3-3.8 1.9-33.1 36.6-41.4 36.9-43 .3-1.6-3.3-22.5 16.8-30.8z"/>
      <path id="XMLID_274_" class="st2" d="M95.6 30.1s9.6 64.2 11.4 77.6c30.3-31.1 37.1-3.8 41.9-3.8-1.9-33.1-36.7-41.4-37-43-.2-1.7 3.9-22.5-16.3-30.8z"/>
      <path id="XMLID_154_" class="st0" d="M17.6 92.6c2.6 6.2 2.2 17.3 2.3 21C16.8 110-.8 94.2 9.3 89.1c4.3-2 6.8-.1 8.3 3.5z"/>
      <path id="XMLID_173_" class="st2" d="M16.1 97.2c1.2 2.9 1 8 1.1 9.7-1.4-1.7-9.5-9-4.9-11.3 1.9-1 3.1-.1 3.8 1.6z"/>
      <path id="XMLID_174_" class="st0" d="M155.2 92.6c-2.6 6.2-2.2 17.3-2.3 21 3.1-3.7 20.7-19.5 10.6-24.5-4.3-2-6.8-.1-8.3 3.5z"/>
      <path id="XMLID_172_" class="st2" d="M156.7 97.2c-1.2 2.9-1 8-1.1 9.7 1.4-1.7 9.5-9 4.9-11.3-1.9-1-3.1-.1-3.8 1.6z"/>
    </g>
    <g id="Face_4">
      <path id="XMLID_131_" class="st3" d="M148.8 113.8c4.6 0 8.3-3.7 8.3-8.3s-3.7-8.3-8.3-8.3c-1.5 0-2.9.4-4.1 1.1-6-15.3-17.8-27.8-32.7-34.6V52.6c-.6-14-12.1-25.1-26.2-25.1S60.1 38.6 59.5 52.6v11.1c-13.9 6.4-25.1 17.6-31.4 31.6-1.5-1.4-3.4-2.2-5.6-2.2-4.6 0-8.3 3.7-8.3 8.3 0 4.6 3.7 8.3 8.3 8.3.4 0 .7 0 1.1-.1-.7 3.8-1.1 7.7-1.1 11.7 0 34.9 28.3 63.2 63.2 63.2s63.2-28.3 63.2-63.2c0-2.5-.2-5-.4-7.5h.3z"/>
      <path id="XMLID_28_" class="st4" d="M63.6 180.5s-23.4-7.7-34.7-31.5-4.5-43.4-4.5-43.4 13.7-2.8 28.2 15.1 11 59.8 11 59.8z"/>
      <path id="XMLID_129_" class="st4" d="M107.8 180.5s23.4-7.7 34.7-31.5 4.5-43.4 4.5-43.4-13.7-2.8-28.2 15.1-11 59.8-11 59.8z"/>
      <g id="XMLID_147_" class="st5">
        <g id="XMLID_243_">
          <path id="XMLID_248_" class="st6" d="M69.8 174.9c10.2 6.5 23.7 7.2 33.8 0 .6-.5 0-1.5-.6-1.1-9.8 7-22.7 6.3-32.5 0-.8-.4-1.4.6-.7 1.1z"/>
        </g>
      </g>
      <g id="XMLID_177_" class="st5">
        <g id="XMLID_216_">
          <path id="XMLID_235_" class="st6" d="M18.1 98.1l6.5 6.5c.6.6 1.5-.3.9-.9L19 97.2c-.6-.5-1.5.3-.9.9z"/>
        </g>
      </g>
      <g id="XMLID_130_" class="st5">
        <g id="XMLID_237_">
          <path id="XMLID_241_" class="st6" d="M24.6 97.2l-6.5 6.5c-.6.6.3 1.5.9.9l6.5-6.5c.5-.6-.4-1.4-.9-.9z"/>
        </g>
      </g>
      <g id="XMLID_190_" class="st5">
        <g id="XMLID_226_">
          <path id="XMLID_230_" class="st6" d="M147.3 102.7l6.5 6.5c.6.6 1.5-.3.9-.9l-6.5-6.5c-.5-.6-1.4.3-.9.9z"/>
        </g>
      </g>
      <g id="XMLID_189_" class="st5">
        <g id="XMLID_220_">
          <path id="XMLID_224_" class="st6" d="M153.8 101.8l-6.5 6.5c-.6.6.3 1.5.9.9l6.5-6.5c.6-.6-.3-1.5-.9-.9z"/>
        </g>
      </g>
    </g>
    <g id="Face_3">
      <path id="XMLID_48_" class="st7" d="M112 60.8v-8.2c-.6-14-12.1-25.1-26.2-25.1S60.1 38.6 59.5 52.6v7.5c-21.8 10-37 20.4-37 45.9 0 34.9 28.3 83.3 63.2 83.3S149 142 149 107.1c0-25.6-15.2-36.3-37-46.3z"/>
      <path id="XMLID_44_" class="st7" d="M11.8 69.9s9 6.9 9.1 14c.1 7.1-1.3 19.5-1.3 19.5S9.7 93.6 8.1 86.2s3.7-16.3 3.7-16.3z"/>
      <g id="XMLID_49_">
        <g id="XMLID_118_">
          <path id="XMLID_122_" class="st8" d="M12.6 78.6c3.9 3.6 4.1 10 3.3 14.7-.1.8 1.1 1.1 1.2.3.9-5.2.6-12.1-3.6-15.9-.6-.5-1.5.4-.9.9z"/>
        </g>
      </g>
      <g id="XMLID_78_">
        <g id="XMLID_123_">
          <path id="XMLID_127_" class="st8" d="M12.2 85c2.8 1.4 3.6 5.6 3.8 8.5 0 .8 1.3.8 1.2 0-.2-3.3-1.2-7.9-4.4-9.6-.7-.4-1.3.7-.6 1.1z"/>
        </g>
      </g>
      <path id="XMLID_80_" class="st7" d="M159.7 69.9s-9 6.9-9.1 14c-.1 7.1 1.3 19.5 1.3 19.5s9.9-9.8 11.5-17.2-3.7-16.3-3.7-16.3z"/>
      <g id="XMLID_79_">
        <g id="XMLID_138_">
          <path id="XMLID_142_" class="st8" d="M158 77.7c-4.3 3.9-4.5 10.7-3.6 15.9.1.8 1.3.5 1.2-.3-.8-4.8-.6-11.2 3.3-14.7.6-.5-.3-1.4-.9-.9z"/>
        </g>
      </g>
      <g id="XMLID_47_">
        <g id="XMLID_133_">
          <path id="XMLID_137_" class="st8" d="M158.6 83.9c-3.3 1.7-4.2 6.2-4.4 9.6 0 .8 1.2.8 1.2 0 .2-2.9 1-7.1 3.8-8.5.8-.4.2-1.5-.6-1.1z"/>
        </g>
      </g>
      <path id="XMLID_94_" class="st9" d="M23.4 117c5.2 2.9 12.9 7.4 18.5 11.1 9.7 6.8 18.9 37.4 23.6 55.7 0 0-14.7-6.4-27.8-28S23.4 117 23.4 117z"/>
      <path id="XMLID_92_" class="st9" d="M148.4 116.9c-5.2 2.9-12.9 7.4-18.5 11.1-9.7 6.8-18.8 37.4-23.5 55.7 0 0 14.7-6.4 27.7-28s14.3-38.8 14.3-38.8z"/>
    </g>
    <g id="Face_2">
      <path id="XMLID_19_" class="st10" d="M28.6 72.1c-3.5-1.9-7.8-.7-9.7 2.8-1.7 3.1-.9 6.9 1.8 9-.3.3-.5.6-.7 1-1.1 2.1-.4 4.7 1.7 5.8 2.1 1.1 4.7.4 5.8-1.7.7-1.3 3.1-5.6 4-7.2 1.8-3.4.5-7.8-2.9-9.7z"/>
      <path id="XMLID_2_" class="st10" d="M143 72.1c3.5-1.9 7.8-.7 9.7 2.8 1.7 3.1.9 6.9-1.8 9 .3.3.5.6.7 1 1.1 2.1.4 4.7-1.7 5.8-2.1 1.1-4.7.4-5.8-1.7-.7-1.3-3.1-5.6-4-7.2-1.8-3.4-.6-7.8 2.9-9.7z"/>
      <path id="XMLID_25_" class="st10" d="M149 121.3c0-25.6-15.2-47.6-37-57.5V52.6c-.6-14-12.1-25.1-26.2-25.1S60.1 38.6 59.5 52.6v11.1c-21.8 10-37 32-37 57.5 0 30.1 21.1 55.3 49.3 61.7.5 3.3 4.3 5.9 8.9 5.9 1.9 0 3.6-.4 5-1.1 1.4.7 3.2 1.1 5 1.1 4.6 0 8.5-2.6 8.9-5.9 28.3-6.3 49.4-31.5 49.4-61.6z"/>
      <circle id="XMLID_5_" class="st11" cx="123.3" cy="104" r="1.2"/>
      <circle id="XMLID_17_" class="st11" cx="127.6" cy="100" r="1.2"/>
      <circle id="XMLID_23_" class="st11" cx="131.8" cy="104" r="1.2"/>
      <circle id="XMLID_33_" class="st11" cx="39.5" cy="104" r="1.2"/>
      <circle id="XMLID_32_" class="st11" cx="43.8" cy="100" r="1.2"/>
      <circle id="XMLID_6_" class="st11" cx="48" cy="104" r="1.2"/>
    </g>
    <g id="Face_1">
      <path id="XMLID_11_" class="st12" d="M137.8 81c1.5-2.7 3-5.9 5.6-7.7 2-1.4 5.4-2.2 6.9.3 1.7 2.7.2 6.8-2.9 7.8-2.9.8-6.7.1-9.6-.4z"/>
      <path id="XMLID_7_" class="st12" d="M112 63.7V52.6c-.6-14-12.1-25.1-26.2-25.1S60.1 38.6 59.5 52.6v11.1c-21.8 10-37 32-37 57.5 0 34.9 28.3 63.2 63.2 63.2s63.2-28.3 63.2-63.2c.1-25.5-15.1-47.5-36.9-57.5z"/>
      <path id="XMLID_1_" class="st12" d="M33.7 81.3c-1.5-2.7-3-5.9-5.6-7.7-2-1.4-5.4-2.2-6.9.3-1.7 2.7-.2 6.8 2.9 7.8 2.9.9 6.7.1 9.6-.4z"/>
      <path id="XMLID_34_" class="st13" d="M148.2 116.7c0 9.1-32.9 9.1-32.9 0s7.4-16.4 16.4-16.4 16.5 7.3 16.5 16.4z"/>
      <path id="XMLID_38_" class="st13" d="M56.1 116.8c0 9.1-32.9 9.1-32.9 0s7.4-16.4 16.4-16.4 16.5 7.3 16.5 16.4z"/>
    </g>
  </g>
  <g id="Noses">
    <g id="Nose_5">
      <path id="XMLID_276_" class="st14" d="M85.7 108.4c-3.8 0-6.8-2.7-6.8-5.9l2-22.5c0-3.3 1.1-5.9 4.8-5.9 3.8 0 4.8 2.7 4.8 5.9l2 22.5c.1 3.2-3 5.9-6.8 5.9z"/>
      <circle id="XMLID_277_" class="st14" cx="74" cy="95.7" r="1.5"/>
      <circle id="XMLID_282_" class="st14" cx="69.1" cy="101" r="1.5"/>
      <circle id="XMLID_283_" class="st14" cx="76.3" cy="102.5" r="1.5"/>
      <circle id="XMLID_285_" class="st14" cx="98.7" cy="95.7" r="1.5"/>
      <circle id="XMLID_284_" class="st14" cx="103.5" cy="101" r="1.5"/>
      <circle id="XMLID_279_" class="st14" cx="96.3" cy="102.5" r="1.5"/>
    </g>
    <g id="Nose_4">
      <path id="XMLID_204_" class="st14" d="M92.4 85.5c0-3.4-2.6-6.1-5.7-6.1-3.2 0-5.7 2.7-5.7 6.1-3.6 1.9-6 5.5-6 9.6 0 6 5.2 10.9 11.6 10.9 6.4 0 11.6-4.9 11.6-10.9.1-4.1-2.3-7.7-5.8-9.6z"/>
      <circle id="XMLID_194_" class="st15" cx="81" cy="101.1" r="2"/>
      <circle id="XMLID_203_" class="st15" cx="92.4" cy="101.1" r="2"/>
    </g>
    <g id="Nose_3">
      <path id="Nose_3" class="st14" d="M98.7 93.3c0-2.3-1.8-4.2-4.1-4.3.5-2.6.8-4.5.8-4.5H77.9s.3 1.9.8 4.5c-2.3.1-4.1 2-4.1 4.3h5.1c1.5 5.8 3.8 12.4 7 12.4s5.5-6.6 7-12.4h5z"/>
    </g>
    <g id="Nose_2">
      <path id="Nose_2" class="st14" d="M96.2 98.9c0-2.5-2-4.5-4.5-4.5V76.9H79.9v17.6c-2.5 0-4.5 2-4.5 4.5H80c.6 2.7 2.9 4.7 5.8 4.7s5.2-2 5.8-4.7h4.6z"/>
    </g>
    <g id="Nose_1">
      <path id="Nose_1" class="st14" d="M93.9 106.7H77.6l3.2-35.5h9.9z"/>
    </g>
  </g>
  <g id="Eyes">
    <g id="Eyes_5">
      <path id="XMLID_200_" class="st16" d="M66.7 83.5c-.3-1-.9-2-1.8-2.6-1.6-1-3.9-1.2-5.4.1-1.5 1.4-1.3 1.7-1.8 2.3-.5-.6-.3-1-1.8-2.3s-3.8-1.1-5.4-.1c-.9.6-1.6 1.5-1.8 2.6-.3 1.3-.3 2.8.2 4 .9 2.1 8.8 9.6 8.8 9.6l.1-.1.1.1s7.9-7.5 8.8-9.6c.3-1.2.3-2.7 0-4z"/>
      <path id="XMLID_197_" class="st16" d="M123.3 83.5c-.3-1-.9-2-1.8-2.6-1.6-1-3.9-1.2-5.4.1s-1.3 1.7-1.8 2.3c-.5-.6-.3-1-1.8-2.3s-3.8-1.1-5.4-.1c-.9.6-1.6 1.5-1.8 2.6-.3 1.3-.3 2.8.2 4 .9 2.1 8.8 9.6 8.8 9.6l.1-.1.1.1s7.9-7.5 8.8-9.6c.4-1.2.4-2.7 0-4z"/>
      <g id="XMLID_193_">
        <g id="XMLID_263_">
          <path id="XMLID_267_" class="st16" d="M60.2 69.6C53.7 67.5 47.4 71 44.6 77c-.7 1.5 1.5 2.7 2.2 1.3 2.3-5 7.2-8.1 12.7-6.3 1.6.6 2.2-1.9.7-2.4z"/>
        </g>
      </g>
      <g id="XMLID_192_">
        <g id="XMLID_268_">
          <path id="XMLID_272_" class="st16" d="M111.5 72c5.5-1.8 10.4 1.2 12.7 6.3.7 1.5 2.8.2 2.2-1.3-2.7-6-9.1-9.5-15.6-7.4-1.5.5-.9 3 .7 2.4z"/>
        </g>
      </g>
    </g>
    <g id="Eyes_4">
      <path id="XMLID_198_" class="st6" d="M51 78.2c0 .7.9 3.4.9 4.1 0 7.4 2.6 13.4 5.8 13.4s5.8-6 5.8-13.4c0-.7 0-1.4-.1-2.1l-12.4-2z"/>
      <path id="XMLID_196_" class="st6" d="M108.3 80.2c0 .7-.1 1.4-.1 2.1 0 7.4 2.6 13.4 5.8 13.4s5.8-6 5.8-13.4c0-.7 2-3.4 1.9-4.1l-13.4 2z"/>
    </g>
    <g id="Eyes_3">
      <g id="XMLID_166_">
        <path id="XMLID_152_" class="st17" d="M68.4 83.5c0 6.1-3.5 11-7.9 11s-7.9-4.9-7.9-11 15.8-6.1 15.8 0z"/>
      </g>
      <path id="XMLID_109_" class="st18" d="M45.5 81.1h22.8"/>
      <g id="XMLID_115_">
        <path id="XMLID_151_" class="st17" d="M105.1 83.5c0 6.1 3.5 11 7.9 11s7.9-4.9 7.9-11-15.8-6.1-15.8 0z"/>
      </g>
      <path id="XMLID_101_" class="st18" d="M128 81.1h-22.8"/>
    </g>
    <g id="Eyes_2">
      <g id="XMLID_12_">
        <circle id="XMLID_41_" class="st19" cx="57.7" cy="87.3" r="7.1"/>
      </g>
      <g id="XMLID_13_">
        <g id="XMLID_63_">
          <path id="XMLID_67_" class="st19" d="M62.2 88.5c.3 4-4.6 6.8-7.9 8-1.5.5-.9 2.9.7 2.4 4.3-1.5 10.1-5 9.7-10.4-.1-1.6-2.6-1.6-2.5 0z"/>
        </g>
      </g>
      <g id="XMLID_15_">
        <g id="XMLID_70_">
          <path id="XMLID_74_" class="st19" d="M60.6 66.6c.3 4-4.6 6.8-7.9 8-1.5.5-.9 2.9.7 2.4 4.3-1.5 10.1-5 9.7-10.4-.1-1.6-2.6-1.6-2.5 0z"/>
        </g>
      </g>
      <g id="XMLID_40_">
        <circle id="XMLID_42_" class="st19" cx="114" cy="87.3" r="7.1"/>
      </g>
      <g id="XMLID_39_">
        <g id="XMLID_52_">
          <path id="XMLID_56_" class="st19" d="M107 88.5c-.4 5.4 5.5 8.9 9.7 10.4 1.5.5 2.2-1.9.7-2.4-3.3-1.2-8.2-3.9-7.9-8 .1-1.6-2.4-1.6-2.5 0z"/>
        </g>
      </g>
      <g id="XMLID_9_">
        <g id="XMLID_59_">
          <path id="XMLID_68_" class="st19" d="M108.7 66.6c-.4 5.4 5.5 8.9 9.7 10.4 1.5.5 2.2-1.9.7-2.4-3.3-1.2-8.2-3.9-7.9-8 .1-1.6-2.4-1.6-2.5 0z"/>
        </g>
      </g>
    </g>
    <g id="Eyes_1">
      <g id="XMLID_3_">
        <circle id="XMLID_22_" class="st20" cx="57.7" cy="87.3" r="7.1"/>
      </g>
      <g id="XMLID_4_">
        <circle id="XMLID_21_" class="st20" cx="114" cy="87.3" r="7.1"/>
      </g>
    </g>
  </g>
  <g id="Mouths">
    <g id="Mouth_5">
      <g id="XMLID_195_" class="st21">
        <g id="XMLID_202_" class="st22">
          <path id="XMLID_219_" class="st6" d="M61.9 112.7c4.6 4 10.4 7 16.2 8.6 11.4 3.1 22.1-.5 30.6-8.6 2.3-2.2-1.2-5.8-3.5-3.5-11.5 10.9-27.9 10.2-39.7 0-2.5-2.1-6.1 1.4-3.6 3.5z"/>
        </g>
      </g>
      <path id="XMLID_261_" class="st19" d="M111.4 138.2c0 14.2-51.4 14.2-51.4 0s11.5-25.7 25.7-25.7 25.7 11.5 25.7 25.7z"/>
      <path id="XMLID_262_" class="st23" d="M92.3 120.3H80v-7.2c2.3-.9 8.1-1.1 12.3.2v7z"/>
      <path id="XMLID_225_" class="st24" d="M72.5 130.7c-.3 5.7 7.4 10.7 13.2 10.7 5.8 0 13.5-4.8 13.2-10.7.1 0-14.6-7.5-26.4 0z"/>
    </g>
    <g id="Mouth_4">
      <g id="XMLID_245_">
        <g id="XMLID_250_">
          <path id="XMLID_254_" class="st6" d="M95.3 113.5c-11-2.9-24.5-1-32 8.4-2 2.5 1.5 6.1 3.5 3.5 6.4-8.1 17.6-9.7 27.1-7.1 3.2.9 4.5-3.9 1.4-4.8z"/>
        </g>
      </g>
      <g id="XMLID_232_">
        <g id="XMLID_256_">
          <path id="XMLID_260_" class="st6" d="M69 128c-2.6-3.3-6.6-5.9-10.6-6.9-3.1-.8-4.5 4-1.3 4.8 3.3.8 6.3 2.9 8.4 5.6.8 1.1 2.7.9 3.5 0 1.1-1 .8-2.5 0-3.5z"/>
        </g>
      </g>
      <g id="XMLID_191_" class="st25">
        <g id="XMLID_206_">
          <path id="XMLID_210_" class="st6" d="M82.2 135.6c2-1.1 4.2-1.8 6.6-1.2.6.1 1.1.3 1.6.6.3.1 1.3.9.4.2 2.5 2 6.1-1.5 3.5-3.5-4.3-3.4-10-2.9-14.5-.4-2.9 1.6-.4 5.9 2.4 4.3z"/>
        </g>
      </g>
    </g>
    <g id="Mouth_3">
      <g id="XMLID_116_">
        <g id="XMLID_184_">
          <path id="XMLID_188_" class="st6" d="M109.6 119.7c-14-7-31.8-7-45.8 0-2.9 1.4-.4 5.7 2.5 4.3 12.3-6.1 28.4-6.1 40.7 0 2.9 1.4 5.5-2.9 2.6-4.3z"/>
        </g>
      </g>
      <g id="XMLID_27_">
        <g id="XMLID_155_">
          <path id="XMLID_159_" class="st6" d="M61.7 127.4c4.7-2.5 7.8-7.5 6.8-12.9-.6-3.2-5.4-1.8-4.8 1.3v-.3c0 .2.1.5 0 .7 0 .7 0 1.2-.2 1.8-.6 2.4-2.2 3.9-4.3 5-2.9 1.5-.3 5.9 2.5 4.4z"/>
        </g>
      </g>
      <g id="XMLID_26_">
        <g id="XMLID_160_">
          <path id="XMLID_171_" class="st6" d="M114.3 123c-2.1-1-3.9-2.5-4.5-4.8-.2-.8-.2-1.1-.2-1.9 0-.3.2-1.6 0-.4.5-3.1-4.3-4.5-4.8-1.3-.9 5.4 2.2 10.4 7.1 12.7 2.8 1.4 5.3-2.9 2.4-4.3z"/>
        </g>
      </g>
      <g id="XMLID_29_" class="st5">
        <g id="XMLID_178_">
          <path id="XMLID_182_" class="st6" d="M82.2 135.6c2-1.1 4.2-1.8 6.6-1.2.6.1 1.1.3 1.6.6.3.1 1.3.9.4.2 2.5 2 6.1-1.5 3.5-3.5-4.3-3.4-10-2.9-14.5-.4-2.9 1.6-.4 5.9 2.4 4.3z"/>
        </g>
      </g>
    </g>
    <g id="Mouth_2">
      <path id="XMLID_46_" class="st19" d="M123 116.2c-3.3-4.3-18.4-.3-23.4-1.9s-6.3-5.6-14.8-5.6-14.8 6.8-19.1 7.4c-4.3.6-11.8-2.6-16 .1-4.3 2.7-.1 14.8 5.1 16.4 5.2 1.7 11-3.4 15.2-3.5 6.1 0 6.9 3.8 14.1 3.8s10.7-3.8 15.6-4.4c6.1-.8 6.8 4.3 13.8 3.2 7.2-1.1 12.8-11.2 9.5-15.5z"/>
      <g id="XMLID_43_" class="st26">
        <g id="XMLID_81_">
          <path id="XMLID_85_" class="st19" d="M125.3 124.8c-1.9 5-6.3 10.7-12.3 9.4-1.6-.3-2.2 2.1-.7 2.4 7.4 1.6 13-4.7 15.4-11.1.6-1.6-1.8-2.2-2.4-.7z"/>
        </g>
      </g>
      <g id="XMLID_35_" class="st26">
        <g id="XMLID_86_">
          <path id="XMLID_90_" class="st19" d="M65.5 133.5c-2.8 1.8-6.5 2.4-9.7 1.8-5.6-1-8.2-5.5-9.7-10.6-.5-1.5-2.9-.9-2.4.7 1.6 5.2 4.2 10.2 9.7 11.9 4.2 1.3 9.6.8 13.4-1.7 1.2-.8 0-3-1.3-2.1z"/>
        </g>
      </g>
    </g>
    <g id="Mouth_1">
      <path id="XMLID_16_" class="st24" d="M75.5 120v.4c0 5.7 4.6 10.3 10.2 10.3 5.7 0 10.3-4.6 10.3-10.3v-.4H75.5z"/>
      <g id="XMLID_8_">
        <g id="XMLID_163_">
          <path id="XMLID_168_" class="st6" d="M61.9 112.7c4.6 4 10.4 7 16.2 8.6 11.4 3.1 22.1-.5 30.6-8.6 2.3-2.2-1.2-5.8-3.5-3.5-11.5 10.9-27.9 10.2-39.7 0-2.5-2.1-6.1 1.4-3.6 3.5z"/>
        </g>
      </g>
    </g>
  </g>
  <g id="Hair">
    <g id="Hair_5">
      <path id="XMLID_281_" class="st16" d="M93.4 12.8c-.9-2.9-3.5-5-6.7-5-3 0-5.6 1.9-6.6 4.6-10.9 2.8-19.2 13.1-20.4 25.8H22.5v3.1h90c-.1-13.6-8.1-25-19.1-28.5zm-7.6 25.4c.4-4.2 3.6-7.4 7.5-7.4s7.1 3.2 7.5 7.4h-15z"/>
    </g>
    <g id="Hair_4">
      <path id="XMLID_176_" class="st19" d="M100.4 10.7H71.6c-6.6 0-12 5.4-12 12v21.5h5.8l1.9-3.1 2 3.1h.7l1.9-3.1 2 3.1h.7l1.9-3.1 2 3.1h.8l1.9-3.1 2 3.1h.6l1.9-3.1 2 3.1h.6l1.9-3.1 2 3.1h.6l1.9-3.1 2 3.1h.4l1.9-3.1 2 3.1h.6l1.9-3.1 2 3.1h6.3V22.7c.6-6.6-4.8-12-11.4-12z"/>
      <path id="XMLID_175_" class="st27" d="M59.6 25.2s7-3.6 10.6-3.8c3.6-.2 8.7 2.4 11.9 2.5s9.3-3.2 13.2-3.2c3.9 0 7.2 4.2 10.2 4 2.9-.2 6.9-3.3 6.9-3.3v7.9s-4 2.8-7.1 2.8c-3.1 0-6.5-3.9-10-4.8-3.5-.9-10.2 2.9-13.2 2.9-2.9 0-7.8-2.1-11-2.5s-11.6 4.4-11.6 4.4v-6.9z"/>
    </g>
    <g id="Hair_2">
      <path id="XMLID_10_" class="st20" d="M95.5 7.9L98.3 9l-4.4 6z"/>
      <path id="XMLID_14_" class="st20" d="M98.3 12.3l1 1.6-5.4 1.1z"/>
      <path id="XMLID_24_" class="st20" d="M70.2 34.6l1.5 5.6h4.7l1.5-4 1.1 4h4.9l1.5-4 1.1 4h26c0-14.6-11.8-26.4-26.4-26.4S59.6 25.6 59.6 40.2H68l2.2-5.6z"/>
    </g>
    <g id="Hair_3">
      <path id="XMLID_132_" class="st28" d="M59.5 58.6s0-.1 0 0z"/>
      <path id="XMLID_143_" class="st28" d="M112 52.6c-.6-14-12.1-29.5-26.2-29.5S60.1 38.6 59.5 52.6v5.9C59.5 50 66 43 72.8 43s11.8 16.9 13 24c1.2-7.1 6.6-24 13-24 7.3 0 13.2 6.9 13.2 15.5v-5.9z"/>
    </g>
    <g id="Hair_1">
      <path id="Hair_1_1" class="st6" d="M70.5 40.4c5.5 0 8.2 8.1 15.1 8.1s9.5-8.2 15.4-8.4c5.8-.2 10.5 5.4 10.5 5.4.4-1.7-2.5-30.8-25.9-30.8S59.5 44.5 60 46.5c0 0 5-6.1 10.5-6.1z"/>
      <g id="XMLID_45_">
        <g id="XMLID_96_">
          <path id="XMLID_100_" class="st6" d="M78.1 12.4c3.4 1.7 5.2 5.5 4.7 8.7-.3 1.6 2.1 2.3 2.4.7.8-4.8-1.6-9.4-5.9-11.5-1.4-.7-2.7 1.4-1.2 2.1z"/>
        </g>
      </g>
      <g id="XMLID_50_">
        <g id="XMLID_103_">
          <path id="XMLID_107_" class="st6" d="M81.5 9c3 2.1 4.3 5.8 3.2 9.3-.5 1.5 1.9 2.2 2.4.7 1.5-4.6-.5-9.4-4.3-12.2-1.4-.9-2.6 1.3-1.3 2.2z"/>
        </g>
      </g>
      <g id="XMLID_77_">
        <g id="XMLID_110_">
          <path id="XMLID_114_" class="st6" d="M87.7 9.4c1.4 3.6.5 7.4-2.6 9.8-1.3 1 .5 2.8 1.8 1.8 3.7-2.9 4.9-7.9 3.2-12.2-.5-1.5-2.9-.9-2.4.6z"/>
        </g>
      </g>
    </g>
  </g>
</svg>



<button onclick="makeRandomFace()" class="new-face-button">New Face!</button>


<a class="credit" href="https://dribbble.com/jana-ampoyo" target="_blank">Face illustrations made with ❤️ by Jana</a>
            
          
!
            
              body {
  background: #0074D9;
}

.new-face-button {
  display: block;
  margin: 0 auto;
  padding: 16px 30px;
  background: #2ECC40;
  box-shadow: 2px 2px 0px 0px rgba(0, 97, 181, 1.0);
  border: none;
  border-radius: 6px;
  color: #fff;
  text-transform: uppercase;
  font-family: arial;
  letter-spacing: 2px;
  cursor: pointer;
}

#face-card {
  display: block;
  margin: 100px auto 40px auto;
  height: 45vh;
  background: #fff;
  box-shadow: 4px 4px 0px 0px rgba(0, 97, 181, 1.0);
  border-radius: 20px;
  > g > g {
    opacity: 0;
    transform: scale(0);
    transition: all 300ms cubic-bezier(0.680, -0.550, 0.265, 1.550);
    transform-origin: center;
  }
}

.credit {
  text-align: center;
  display: block;
  margin: 40px auto;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  opacity: 0.5;
}
            
          
!
            
              //
// 
// --------------------

function makeRandomFace() {
  var totalFacesVariants = 5;
  var arr = [];
  for (var i = 0, l = totalFacesVariants; i < l; i++) {
    arr.push(Math.floor(Math.random() * totalFacesVariants) + 1)
  };

  var faceNum = arr[0];
  var hairNum = arr[1];
  var eyesNum = arr[2];
  var noseNum = arr[3];
  var mouthNum = arr[4];

  $("#Faces > g").css({
    'opacity': '0',
    'transform': 'scale(0.8)'
  });
  $("#Face_" + faceNum).css({
    'opacity': '1',
    'transform': 'scale(1)'
  });

  $("#Hair > g").css({
    'opacity': '0',
    'transform': 'scale(0) translateY(-60px)'
  });
  $("#Hair_" + hairNum).css({
    'opacity': '1',
    'transform': 'scale(1) translateY(0)',
    'transition-delay': '0.3s'
  });

  $("#Noses > g").css({
    'opacity': '0',
    'transform': 'scale(0)'
  });
  $("#Nose_" + noseNum).css({
    'opacity': '1',
    'transform': 'scale(1)',
    'transition-delay': '0.1s'
  });

  $("#Eyes > g").css({
    'opacity': '0',
    'transform': 'scale(0)'
  });
  $("#Eyes_" + eyesNum).css({
    'opacity': '1',
    'transform': 'scale(1)'
  });

  $("#Mouths > g").css({
    'opacity': '0',
    'transform': 'scale(0)'
  });
  $("#Mouth_" + mouthNum).css({
    'opacity': '1',
    'transform': 'scale(1)',
    'transition-delay': '0.3s'
  });
}

makeRandomFace();
            
          
!
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