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 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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

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.

            
              <article>
  <div class="overlay" data-state="0"></div>
  
  <div class="wrapper">
    <h1>My money's in that office, right?</h1>
  
    <section>
    <p>
     If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there. Then I'm gonna shoot that bitch in the kneecaps, find out where my goddamn money is. She gonna tell me too.
    </p>
    <p>
    Hey, look at me when I'm talking to you, motherfucker. You listen: we go in there, and that nigga Winston or anybody else is in there, you the first motherfucker to get shot.
    </p>
    </section>
  
    <h2>You understand?</h2>
  </div>
</article>
            
          
!
            
              @import "compass/css3";

@import url(https://fonts.googleapis.com/css?family=Dosis:400,700,800);

* {
  @include box-sizing (border-box);
}

body {
  margin: 1em;
  font: 2em 'Dosis', sans-serif;
  overflow-x:hidden;
}

.overlay {
  position:absolute;
  top:0;
  left:0;
  width:200px;
  height:200px;
  border-radius:50%;
  box-shadow: 
    /* overlay */
    0 0 0 200em rgba(255, 255, 255, 1)
  ;
  border: .35em solid #666;
  @include background(radial-gradient(rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, .4) 80%));
  
  @include transition(
    transform .2s ease-in-out, 
    background .2s ease-in-out,
    box-shadow .35s ease-in-out,
    border .15s ease-in-out
  );
  
  &:after {
    $factor: 3;
    position:absolute;
    left:50%;
    top:50%;
    height:.15em * $factor;
    width:.15em * $factor;
    margin:-.075em * $factor 0 0 -.075em * $factor;
    border-radius:50%;
    background:rgba(0, 0, 0, .2);
  }
  
  &[data-state="1"] {
    @include transform(scale(2, 2));
    @include background(radial-gradient(rgba(255, 255, 255, 0) 0%, rgba(0, 0, 0, .4) 80%),
      radial-gradient(rgba(255, 0, 0, .4) 10%, rgba(200, 0, 0, .1) 30%));
    
    box-shadow: 
      /* overlay */
      0 0 0 200em rgba(255, 255, 255, 1),
    
      /* lens */
      inset 0 -1em 0 .05em rgba(120, 120, 120, .4),
      inset 0 1em 0 .05em rgba(120, 120, 120, .4)
    ;
    
    border: .5em solid #B83D4B;
    
    &:after {
      content:'';
    }
    
    + .wrapper {
      font-size:1.25em;
    }
  }
}

.wrapper {
  @include transition(
    font-size .25s ease-in-out
  );
}

article {
  h1 {
    font-weight:800;
    font-size:2.25em;
    color: rgba(240,192,0,.8);
    margin:1em 0;
  }
  
  h2 {
    font-weight:700;
    color: rgba(240,0,0,.8);
    margin:.5em 0;
  }
  
  section {
    @include columns(10em 2);
  }
}
            
          
!
            
               /**
  Creepy eye

  Move the creepy eye to show the content hidden by a overlay (box-shadow).

  Inspired by nimbletank.com (Thanks to Francesco Trillini)

  # 2013 by Tim Pietrusky
  # timpietrusky.com
**/

var overlay = document.querySelector('.overlay'),
    height = 200,
    width = 200;

/**
 * Change position of overlay on movement
 */
document.addEventListener('mousemove', function(e) {
  setPosition(e);
});

document.addEventListener('touchmove', function(e) {
  setPosition(e);
});

/**
 * Change state of overlay on click/touch stuff
 */
overlay.addEventListener('click', function(e) {
  if (overlay.dataset['state'] == 0) {
    overlay.dataset['state'] = 1;
  } else {
    overlay.dataset['state'] = 0;
  }
  
  setPosition(e);
});

function setPosition(e) {
  overlay.style.top = e.pageY - height / 2 + "px";
  overlay.style.left = e.pageX - width / 2 + "px";
}
            
          
!
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