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


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.


                <section id="section-intro">
    <header id="nav-left">
      <a href="#section-intro"><img id="green-leaf" src="" /></a>
      <a id="nav-title" href="">leafie</a>
    <div id="nav-right">
      <a class="nav-right-link" id="nav-board" href="#section-board">The Board</a>
      <a class="nav-right-link" id="nav-code" href="#section-code">Code Editor</a>
      <a class="nav-right-link" id="nav-draw" href="#section-draw">Drawing Canvas</a>
      <a class="nav-right-link" id="nav-write" href="#section-write">Writing Area</a>
  <div id="intro-content">
    <a href=""><img id="intro-img" src="" /></a>



                body {
  margin: 0;
  font-family: "Helvetica Neue", "Open Sans";

#section-intro {
  width: 100%;
  height: 100vh;
  background-color: rgb(80,194,149);

#intro-content {
  width: 100%;
  height: 104vh;
  display: flex;
  align-items: center;
  justify-content: center;

#intro-content a {
  text-align: center;
  margin-top: 2em;
#intro-content img {
  width: 75%;
  display: inline-block;

#section-intro nav {
  z-index: 2;
  width: 100%;
  position: fixed;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: rgb(80,194,149);

/* Left side of nav */
nav #nav-left {
  order: 1;
  margin-left: 10px;
  font-family: "Pacifico";

nav #green-leaf {
  width: 2em;
  float: left;
  margin-top: 6px;

nav #nav-title {
  display: inline-block;
  color: white;
  font-size: 2em;
  font-weight: 500;
  letter-spacing: 1.5px;
  margin-left: 0.6em;
  text-decoration: none;

/* Right side of nav */
nav #nav-right {
  order: 2;
  margin-right: 3em;
  font-weight: 500;
  font-size: 0.9em;
  letter-spacing: 0.5px;

nav .nav-right-link {
  display: inline-block;
  color: white;
  text-decoration: none;
nav #nav-board {
  margin-right: 2em;

nav #nav-code {
  margin-right: 2em;

nav #nav-draw {
  margin-right: 2em;


  October 13, 2016

 Hover Shake causes HTML elements to shake on hover.

  Dependencies: jQuery
  Important note: elements must display block or inline-block.

  First parameter is a string that represents an HTML element.
  For example: "#title-header" or ".thoseItems"
  Second parameter is an integer that represents the time in miliseconds
  it will take for the element to oscillate to one side. Start with 100
  for an average speed.
  Third parameter is an integer representing the number of degrees
  the element will oscillate. Start with 1 for average shake.

  An example of a call to hoverShake: hoverShake('myImg', 100, 1);

function hoverShake(myElement, speed, deg) {
// On mouse enter rotate element on timed interval. For symmetric oscillation,
// speed of outer interval is 2x speed of inner timeout.
 $(myElement).mouseenter(function() {
   myInterval = setInterval(function() {
     $(myElement).css('transform', 'rotate('+deg+'deg)');
     myTimeout = setTimeout(function() {
       $(myElement).css('transform', 'rotate('+(360-deg)+'deg)');
     }, speed);
   }, speed * 2);
 // On mouse exit terminate intervals.
 $(myElement).mouseleave(function() {
   $(myElement).css('transform', 'rotate(0deg)');

hoverShake('#green-leaf', 100, 5);
hoverShake('#nav-title', 100, 1);
hoverShake('#nav-board', 100, 1);
hoverShake('#nav-code', 100, 1);
hoverShake('#nav-draw', 100, 1);
hoverShake('#nav-write', 100, 1);
hoverShake('#intro-img', 200, 1);