Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <h1 class="shadow">LOVE</h1>
<i class="shadow button">&amp;</i>
<h1 class="shadow">NONSENSE</h1>
<main>
<p>So much has changed in this short time we've had together. What drives us forward may differ &mdash; but I argue it always has. What pulls us together again is a constant growth, a thirst for life as we see it, like roots and branches finding purchase through the dark and void. Together, separate, <em>equal</em>.</p>
<p>When will things get better? They do every time I see you smile. Every second I hold your hand, watch you be a mother, giggle at nothings, or wake next to me in the morning. Every moment you are with me is deposit I hope to pay back in kind one day. I am impossibly in the <span class="debt">red</span>.</p>
</main>
<footer>
  <p>
    <i>stay you</i>
  </p>
</footer>
              
            
!

CSS

              
                body{
  width: 100%;
  height: 100%;
  margin: 1em auto;
  text-align: center;
  background:  url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/94505/fabric_of_squares_gray.png);
}

h1{
  margin: 0 auto;
  font-family: 'Open Sans Condensed', sans-serif;
  font-weight: 300;
  text-shadow: 5px 5px 0 grey;
  font-size: 5em;
}

.debt{
  color: red;
}

i{
  font-family: 'Berkshire Swash', cursive;
  font-size: 4em;
  min-width: 65px;
  display: inline-block;
  text-indent: 3px;
  line-height: 1.1em;
  position: relative;
  text-shadow: 5px 5px 0 grey;
  z-index: 2;
    &.button:before{
    border: 1px solid black;
    border-radius: 100px;
    min-width: 68px;
    height: 75px;
    padding: 0;
    padding-right: 8px;
    display: inline-block;
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: grey;
    z-index: -1;
  }
  &.button:after{
    border: 1px solid black;
    border-radius: 100px;
    min-width: 65px;
    height: 72px;
    padding: 0;
    padding-right: 8px;
    display: inline-block;
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: white;
    z-index: -1;
  }
}

main, footer{
  padding: 5px;
}

p{
  width: 100%;
  text-align: left;
  font-size: 16px;
  line-height: 1.5em;
  margin: 0 auto 1.5em;
  max-width: 450px; 
  &:last-of-type{
    margin-bottom: 0;
  }
  i{
    text-shadow: none;
    text-align: center;
    display: block;
  }
}
              
            
!

JS

              
                $(function(){

  var weight = 75;
  
  $('body').on('mousemove', function(event){
    //find left/right of center scale
    var pageW = $('body').width(),
        xScale = event.pageX - (pageW/2);
    
    //find top/bottom of center scale
    var pageH = $('body').height(),
        yScale = event.pageY - (pageH/2);
    
    var newShadow = xScale / weight + "px " + yScale / weight + "px 0 grey";   
    
    //adjust the shadows according to the scale
    $('.shadow').css({
      'text-shadow': newShadow
    });
    
  });
  
});
              
            
!
999px

Console