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.

            
              .wrapper
  a#link.link(href='#')
    svg#svga(xmlns='http://www.w3.org/2000/svg', viewbox='0 0 497.8 497.8')
      path#a.a(d='M461.4 351.1v69.1a98.86 98.86 0 0 1-98.6 98.6H108.6A98.86 98.86 0 0 1 10 420.2V166a98.86 98.86 0 0 1 98.6-98.6h69.1a17.4 17.4 0 1 1 0 34.8H108.6A64.23 64.23 0 0 0 44.8 166V420.2A64.23 64.23 0 0 0 108.6 484H362.8a64.23 64.23 0 0 0 63.8-63.8V351.1h0a17.4 17.4 0 1 1 34.8 0ZM507.8 38.4l-5.1-12.3L490.4 21H350.5a17.4 17.4 0 1 0 0 34.8h97.9L276.2 228a17.39 17.39 0 0 0 24.6 24.6L473 80.4v97.9a17.4 17.4 0 0 0 34.8 0Z', transform='translate(-10 -21)')
    | click me super please
    svg#svgc(xmlns='http://www.w3.org/2000/svg', viewbox='0 0 600 600')
      g#popGroup
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='260.8', y1='300.3', x2='235.2', y2='300.7')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='271.8', y1='323.6', x2='253.3', y2='342.7')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='296.1', y1='332.5', x2='296.2', y2='357.3')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='319.1', y1='322.2', x2='336.5', y2='339.5')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='328.7', y1='299.2', x2='354.7', y2='298.8')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='319.1', y1='274.8', x2='336.5', y2='256.8')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='295.9', y1='264.5', x2='295.9', y2='240')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='270.9', y1='274.3', x2='253.3', y2='256.8')
  |  
  a#link.link(href='#')
    svg#svga(xmlns='http://www.w3.org/2000/svg', viewbox='0 0 497.8 497.8')
      path#a.a(d='M461.4 351.1v69.1a98.86 98.86 0 0 1-98.6 98.6H108.6A98.86 98.86 0 0 1 10 420.2V166a98.86 98.86 0 0 1 98.6-98.6h69.1a17.4 17.4 0 1 1 0 34.8H108.6A64.23 64.23 0 0 0 44.8 166V420.2A64.23 64.23 0 0 0 108.6 484H362.8a64.23 64.23 0 0 0 63.8-63.8V351.1h0a17.4 17.4 0 1 1 34.8 0ZM507.8 38.4l-5.1-12.3L490.4 21H350.5a17.4 17.4 0 1 0 0 34.8h97.9L276.2 228a17.39 17.39 0 0 0 24.6 24.6L473 80.4v97.9a17.4 17.4 0 0 0 34.8 0Z', transform='translate(-10 -21)')
    | click me please
    svg#svgc(xmlns='http://www.w3.org/2000/svg', viewbox='0 0 600 600')
      g#popGroup
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='260.8', y1='300.3', x2='235.2', y2='300.7')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='271.8', y1='323.6', x2='253.3', y2='342.7')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='296.1', y1='332.5', x2='296.2', y2='357.3')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='319.1', y1='322.2', x2='336.5', y2='339.5')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='328.7', y1='299.2', x2='354.7', y2='298.8')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='319.1', y1='274.8', x2='336.5', y2='256.8')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='295.9', y1='264.5', x2='295.9', y2='240')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='270.9', y1='274.3', x2='253.3', y2='256.8')
  |  
  a#link.link(href='#')
    svg#svga(xmlns='http://www.w3.org/2000/svg', viewbox='0 0 497.8 497.8')
      path#a.a(d='M461.4 351.1v69.1a98.86 98.86 0 0 1-98.6 98.6H108.6A98.86 98.86 0 0 1 10 420.2V166a98.86 98.86 0 0 1 98.6-98.6h69.1a17.4 17.4 0 1 1 0 34.8H108.6A64.23 64.23 0 0 0 44.8 166V420.2A64.23 64.23 0 0 0 108.6 484H362.8a64.23 64.23 0 0 0 63.8-63.8V351.1h0a17.4 17.4 0 1 1 34.8 0ZM507.8 38.4l-5.1-12.3L490.4 21H350.5a17.4 17.4 0 1 0 0 34.8h97.9L276.2 228a17.39 17.39 0 0 0 24.6 24.6L473 80.4v97.9a17.4 17.4 0 0 0 34.8 0Z', transform='translate(-10 -21)')
    | click me
    svg#svgc(xmlns='http://www.w3.org/2000/svg', viewbox='0 0 600 600')
      g#popGroup
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='260.8', y1='300.3', x2='235.2', y2='300.7')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='271.8', y1='323.6', x2='253.3', y2='342.7')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='296.1', y1='332.5', x2='296.2', y2='357.3')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='319.1', y1='322.2', x2='336.5', y2='339.5')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='328.7', y1='299.2', x2='354.7', y2='298.8')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='319.1', y1='274.8', x2='336.5', y2='256.8')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='295.9', y1='264.5', x2='295.9', y2='240')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='270.9', y1='274.3', x2='253.3', y2='256.8')
  |  
  a#link.link(href='#')
    svg#svga(xmlns='http://www.w3.org/2000/svg', viewbox='0 0 497.8 497.8')
      path#a.a(d='M461.4 351.1v69.1a98.86 98.86 0 0 1-98.6 98.6H108.6A98.86 98.86 0 0 1 10 420.2V166a98.86 98.86 0 0 1 98.6-98.6h69.1a17.4 17.4 0 1 1 0 34.8H108.6A64.23 64.23 0 0 0 44.8 166V420.2A64.23 64.23 0 0 0 108.6 484H362.8a64.23 64.23 0 0 0 63.8-63.8V351.1h0a17.4 17.4 0 1 1 34.8 0ZM507.8 38.4l-5.1-12.3L490.4 21H350.5a17.4 17.4 0 1 0 0 34.8h97.9L276.2 228a17.39 17.39 0 0 0 24.6 24.6L473 80.4v97.9a17.4 17.4 0 0 0 34.8 0Z', transform='translate(-10 -21)')
    | click
    svg#svgc(xmlns='http://www.w3.org/2000/svg', viewbox='0 0 600 600')
      g#popGroup
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='260.8', y1='300.3', x2='235.2', y2='300.7')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='271.8', y1='323.6', x2='253.3', y2='342.7')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='296.1', y1='332.5', x2='296.2', y2='357.3')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='319.1', y1='322.2', x2='336.5', y2='339.5')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='328.7', y1='299.2', x2='354.7', y2='298.8')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='319.1', y1='274.8', x2='336.5', y2='256.8')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='295.9', y1='264.5', x2='295.9', y2='240')
        line(fill='none', stroke='#38c678', stroke-width='4', stroke-linecap='round', stroke-linejoin='round', stroke-miterlimit='10', x1='270.9', y1='274.3', x2='253.3', y2='256.8')
  svg#svgb(xmlns='http://www.w3.org/2000/svg', width='480.4', height='497.8', viewbox='0 0 480.4 497.8')
    path#b.b(d='M461.4,351.1v69.1a98.86,98.86,0,0,1-98.6,98.6H108.6A98.86,98.86,0,0,1,10,420.2V166a98.86,98.86,0,0,1,98.6-98.6h69.1a17.4,17.4,0,1,1,0,34.8H108.6A64.23,64.23,0,0,0,44.8,166V420.2A64.23,64.23,0,0,0,108.6,484H362.8a64.23,64.23,0,0,0,63.8-63.8V351.1h0a17.4,17.4,0,1,1,34.8,0ZM333.1,38.4,490.4,21 M447.64,92.45a17.92,17.92,0,0,0-25.35.42L300.61,218.67c-6.89,7.12-19.43,8.89-28,4L229.7,198.06a17.92,17.92,0,0,0-24.46,6.64l-15.85,27.66A17.93,17.93,0,0,0,196,256.82s104,59.55,104.08,59.46S437.54,174.51,471,140a17.94,17.94,0,0,0-.42-25.35', transform='translate(-10 -21)')


            
          
!
            
              body
    background #ECE9E6
    background -webkit-linear-gradient(to left, #ECE9E6 , #FFFFFF)
    background linear-gradient(to left, #ECE9E6 , #FFFFFF)
    width 100%
    height 100%

.wrapper
    width 500px
    height auto
    position absolute
    margin 0 auto
    top 15%
    left 0
    right 0

.link
    display block
    text-decoration none
    color #000
    padding 25px 60px
    position relative
    font-size 18px
    font-family 'Quicksand', sans-serif
    font-weight 500
    text-transform uppercase
    letter-spacing 5px
    transition-duration 0.3s
    &.added
        color #38c678

#svga
    width 35px
    position absolute
    left 0px
    top 16px

#svgb
    position absolute
    visibility hidden

.a
    fill #fb0339

g#popGroup
    z-index -1

#popGroup
    line
        opacity 0

svg#svgc
    position absolute
    left -172px
    top -157px
    z-index -1

@media (max-width: 450px)
    .wrapper
        width 350px
    svg#svgc
        left -96px
        top -81px
            
          
!
            
              Array.prototype.forEach.call(link, function(el, i){
  //vars
  var selectAll = function(s) {
         return el.querySelectorAll(s);
      },
      popGroup = selectAll('#popGroup line'),
      a = selectAll('#a'),
      b = document.getElementById('b'),
      
      link = document.querySelectorAll('.link'),
      tl = new TimelineMax({paused: true}),
      tlp2 = new TimelineMax({paused: true}),
      tlp = new TimelineMax();
   

  //timeline
  tlp
    .set(popGroup, {
      drawSVG:'20% 20%',
      alpha:0
    });
  
  tlp.play();
  
  tl
    .to(a, 0.3, {morphSVG: b, 
               ease:Power4.easeOut,
               css:{fill: '#38c678'}
    });
   
  tlp2
   .set(popGroup, {
      alpha:1
    })
    .staggerTo(popGroup, 0.1, {
    drawSVG:'50% 20%',
    ease:Expo.easeIn
    }, 0)
    .staggerTo(popGroup, 0.8, {
    drawSVG:'100% 100%',
    ease:Expo.easeOut
    }, 0);
  
  //click function
  el.addEventListener('click', function(){
    if(el.classList.contains('added')){
        tl.reverse();
       } else {
        tl.play();
        tlp2.restart();
       } 
        el.classList.toggle('added');
    });
  
});



            
          
!
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