Pen Settings

HTML

CSS

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

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="content--wrapper">  
  <p class="preheader">Hoi! Ik ben Gertjan</p>
    <p class="leadin">
    <!-- svg scribbles -->



      <a id="manVader" class="scribble--doubleLines">
       <svg class="doubleLines" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 820 30">
                 <line class="doubleLines line up bottom" x1="10" vector-effect="non-scaling-stroke" y1="20" x2="800" y2="5"></line>
                 <line class="doubleLines line down bottom" vector-effect="non-scaling-stroke" x1="18" y1="25" x2="800" y2="26"></line>
                 <line class="doubleLines line up top" x1="10" vector-effect="non-scaling-stroke" y1="20" x2="800" y2="5"></line>
                 <line class="doubleLines line down top" vector-effect="non-scaling-stroke" x1="18" y1="25" x2="800" y2="26" style="stroke-dashoffset: 0px; stroke-dasharray: none;"></line> 
              </svg>
        Man van & vader</a>. 
      Lezer. Hardloper. Fietser. 
      <a id="eigenaar" class="scribble--wiggleLine"  href="">
         <svg class="wiggleLine" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 50">
         <path class="wiggleLine line bottom " vector-effect="non-scaling-stroke" d="M20.45,267.58l12.61,8.88a4,4,0,0,0,6-1.7l6.87-16.13a4,4,0,0,1,5.24-2.11,3.91,3.91,0,0,1,.67.36l31,20.9a4,4,0,0,0,4.52,0l22.45-15.61a4,4,0,0,1,5,.33l13.73,12.59a4,4,0,0,0,6.52-1.75l5.37-17.13a4,4,0,0,1,7.74.41l3.4,16.93a4,4,0,0,0,4.72,3.13,3.93,3.93,0,0,0,1.39-.57l21.77-14.23a4,4,0,0,1,4.6.16l16.43,12.44a4,4,0,0,0,6.41-3.19V253.8a4,4,0,0,1,7.26-2.32l16.24,22.76a4,4,0,0,0,5.58.93,4.05,4.05,0,0,0,1.14-1.26l15.77-27.37a4,4,0,0,1,6.65-.42l15.59,20.59a4,4,0,0,0,4,1.5l35.18-7.45a4,4,0,0,1,3.66,1.08l14.61,14.61a4,4,0,0,0,5.66,0l0,0,19.08-19.53a4,4,0,0,1,5.49-.23L374.68,267a4,4,0,0,0,4.48.52L392,260.76a4.07,4.07,0,0,1,1.85-.45h65.27" transform="translate(8.47 -239.53)"/>
         <path class="wiggleLine line top" vector-effect="non-scaling-stroke" d="M20.45,267.58l12.61,8.88a4,4,0,0,0,6-1.7l6.87-16.13a4,4,0,0,1,5.24-2.11,3.91,3.91,0,0,1,.67.36l31,20.9a4,4,0,0,0,4.52,0l22.45-15.61a4,4,0,0,1,5,.33l13.73,12.59a4,4,0,0,0,6.52-1.75l5.37-17.13a4,4,0,0,1,7.74.41l3.4,16.93a4,4,0,0,0,4.72,3.13,3.93,3.93,0,0,0,1.39-.57l21.77-14.23a4,4,0,0,1,4.6.16l16.43,12.44a4,4,0,0,0,6.41-3.19V253.8a4,4,0,0,1,7.26-2.32l16.24,22.76a4,4,0,0,0,5.58.93,4.05,4.05,0,0,0,1.14-1.26l15.77-27.37a4,4,0,0,1,6.65-.42l15.59,20.59a4,4,0,0,0,4,1.5l35.18-7.45a4,4,0,0,1,3.66,1.08l14.61,14.61a4,4,0,0,0,5.66,0l0,0,19.08-19.53a4,4,0,0,1,5.49-.23L374.68,267a4,4,0,0,0,4.48.52L392,260.76a4.07,4.07,0,0,1,1.85-.45h65.27" transform="translate(8.47 -239.53)"/>
        </svg>
        Eigenaar</a>. 
      Ontwerper. Art-director. 
      <a id="maker" class="scribble--circleLine" href="">
        <svg class="circleLine" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 350 140">
        <path class="circleLine line bottom" vector-effect="non-scaling-stroke" d="M85.24,39.12C142,16.51,327-.28,334.55,42.44c12.23,68.9-257.32,80.35-313.66,44.29C-35,50.94,77.23,3.51,173.78,6.92" transform="translate(-0.95 -1.74)"/>
        <path class="circleLine line top" vector-effect="non-scaling-stroke" d="M85.24,39.12C142,16.51,327-.28,334.55,42.44c12.23,68.9-257.32,80.35-313.66,44.29C-35,50.94,77.23,3.51,173.78,6.92" transform="translate(-0.95 -1.74)"/>
      </svg> 
      Maker</a>
      . 
      <a id="onderzoeker" class="scribble--flowLine" href="">
         <svg class="flowLine" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 282 143.71">
          <path class="flowLine line bottom" d="M5.7,74.24q1.41,8.69,2.82,17a12,12,0,0,0,23.72-1.09l1.35-17.87a8,8,0,0,1,15.91-.58l2.81,18.85a8.52,8.52,0,0,0,16.82.22L77.58,42.9a8.31,8.31,0,0,1,16.5,1.53l-.89,87.4a7.81,7.81,0,0,0,15.58.82l7.52-79.08a8.52,8.52,0,0,1,17,.24l2.84,42.3a4.75,4.75,0,0,0,9.48-.2l1.07-41.76a8.52,8.52,0,0,1,16.76-1.92l12.65,48.82a8.52,8.52,0,0,0,16.67-.85l13.7-89.45A5.58,5.58,0,0,1,217.53,12l-7.41,109.87a8.3,8.3,0,0,0,16.46,2L237.06,64.4A8.52,8.52,0,0,1,254,65.83L254.11,92a11.89,11.89,0,0,0,23.59,2" transform="translate(-0.7 -1.01)"/>
          <path class="flowLine line top" d="M5.7,74.24q1.41,8.69,2.82,17a12,12,0,0,0,23.72-1.09l1.35-17.87a8,8,0,0,1,15.91-.58l2.81,18.85a8.52,8.52,0,0,0,16.82.22L77.58,42.9a8.31,8.31,0,0,1,16.5,1.53l-.89,87.4a7.81,7.81,0,0,0,15.58.82l7.52-79.08a8.52,8.52,0,0,1,17,.24l2.84,42.3a4.75,4.75,0,0,0,9.48-.2l1.07-41.76a8.52,8.52,0,0,1,16.76-1.92l12.65,48.82a8.52,8.52,0,0,0,16.67-.85l13.7-89.45A5.58,5.58,0,0,1,217.53,12l-7.41,109.87a8.3,8.3,0,0,0,16.46,2L237.06,64.4A8.52,8.52,0,0,1,254,65.83L254.11,92a11.89,11.89,0,0,0,23.59,2" transform="translate(-0.7 -1.01)"/>
        </svg>
        Onderzoeker</a>
      . 
  </p>          
</div>

              
            
!

CSS

              
                @use postcss-nested;
@use postcss-simple-vars;

.content--wrapper {
  position: relative;
}

svg {
  position: absolute;
  z-index: -5;
}

.content--wrapper .leadin {  

  .doubleLines { 
    width: 14ch; /* svg width based on number of characters */
    top: 2em; /* svg position based on line-height 2 * 1.2em */
    left: -20px;

    .line {
          fill: none;
          stroke: #f07f58;
          stroke-linecap: round;
          stroke-linejoin: round;
          stroke-width: 10px;
        }

    .line.top {
       stroke: #8B2500;     
     }      
  }

  .wiggleLine {
    width: 8ch; /* svg width based on number of characters */
    top: 4.2em; /* svg position based on line-height 2 * 1.2em */
    left: -20px;


    .line {
      fill:none;
      stroke:#038d38;
      stroke-linecap:round;
      stroke-linejoin:round;
      stroke-width:10px;
    }

    .line.top {
       stroke: #004713;     
     }

  }

  .flowLine {
    width: 5ch; /* svg width based on number of characters */
    top: 5.7em; /* svg position based on line-height 2 * 1.2em */
    left: 2ch;

    .line
      {
        fill:none;
        stroke:#fdd031;

        stroke-linecap:round;
        stroke-linejoin:round;
        stroke-width:10px;
    }

    .line.top {
       stroke: #FC9130;     
     }

  }


  .circleLine {
    width: 6ch; /* svg width based on number of characters */


     .line {
        fill:none;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke: #025DE8;     
        stroke-width:10px;     
    }

    .line.top {
       stroke: #9CDEF5;     
     }
  }

  a {
    color: black;
    display: inline-block;    
  }
  
  a.scribble--doubleLines {
    position: relative;

    svg {
      position: absolute;
      top: 40px; 
      left: -30px;
    }
  }
  
  a.scribble--wiggleLine {
    position: relative;

    svg {
      position: absolute;
      top: 40px; 
      left: -30px;
    }
  }
  
  a.scribble--circleLine {
    position: relative;

    svg {
      position: absolute;
      top: 0px; 
      left: -15px;
    }
  }
  
  a.scribble--flowLine {
    position: relative;

    svg {
      position: absolute;
      top: -10px; 
      left: 50px;
    }
  }
}
              
            
!

JS

              
                console.clear();

// get elements

var link_manVader = document.getElementById('manVader');
var link_eigenaar = document.getElementById('eigenaar');
var link_maker = document.getElementById('maker');
var link_onderzoeker = document.getElementById('onderzoeker');



var scribbleSpeed = 1;
var scribbleEase = 'power4.InOut';

gsap.defaults({
  ease: scribbleEase, 
  duration: scribbleSpeed,
  //paused:true,
});


var tl_doubleLines = gsap.timeline({ paused:true });
tl_doubleLines.fromTo(".doubleLines .line.top", {drawSVG:"0 0%"}, { drawSVG:"80% 100%"}),
tl_doubleLines.fromTo(link_manVader, {color: "#000000"}, {color: "#FF0000", duration: 0.2, ease: "power2.inOut"}, "<");

var tl_wiggleLine = gsap.timeline({ paused:true });
tl_wiggleLine.fromTo(".wiggleLine .line.top", {drawSVG:"0% 0%"}, {drawSVG:"80% 100%"}),
tl_wiggleLine.fromTo(link_eigenaar, {color: "#000000"}, {color: "#FF0000", duration: 0.2, ease: "power2.inOut"}, "<");

var tl_flowLine = gsap.timeline({ paused:true });
tl_flowLine.fromTo(".flowLine .line.top", {drawSVG:"0% 0%"}, {drawSVG:"80% 100%"}),
tl_flowLine.fromTo(link_onderzoeker, {color: "#000000"}, {color: "#FF0000", duration: 0.2, ease: "power2.inOut"}, "<");

var tl_circleLine = gsap.timeline({ paused:true });
tl_circleLine.fromTo(".circleLine .line.top", {drawSVG:"0% 0%"}, {drawSVG:"80% 100%"}, "<"),
tl_circleLine.fromTo(link_maker, {color: "#000000"}, {color: "#FF0000", duration: 0.2, ease: "power2.inOut"}, "<");


// Hover events
link_manVader.onmouseenter = function(){tl_doubleLines.play()};
link_manVader.onmouseleave = function(){tl_doubleLines.reverse()};

link_eigenaar.onmouseenter = function(){tl_wiggleLine.play()};
link_eigenaar.onmouseleave = function(){tl_wiggleLine.reverse()};

link_maker.onmouseenter = function(){tl_circleLine.play()};
link_maker.onmouseleave = function(){tl_circleLine.reverse()};

link_onderzoeker.onmouseenter = function(){tl_flowLine.play()};
link_onderzoeker.onmouseleave = function(){tl_flowLine.reverse()};
              
            
!
999px

Console