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

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="wrapper">
  
  
<div class="cursor"></div>

<div class="content_cursor">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer id leo id massa ultrices euismod sed ut ipsum. Sed bibendum vehicula massa, id eleifend lorem dapibus id. Ut tempus ultrices felis a consectetur. Nulla sagittis ornare augue sed pellentesque. Curabitur tincidunt volutpat justo, id porta lectus ullamcorper nec. Aenean dolor leo, pharetra at iaculis non, bibendum a tortor. Donec sollicitudin arcu non metus venenatis volutpat. In at metus velit.

Etiam ac facilisis quam. Fusce tincidunt, nunc quis commodo mattis, ex nunc consectetur turpis, sed consectetur massa sapien eu diam. Pellentesque eu lorem nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce gravida sapien non magna iaculis dapibus. Aenean fermentum libero vel faucibus convallis. Nulla euismod massa porttitor, interdum arcu nec, iaculis felis. Aenean ullamcorper ante eu suscipit varius. Sed vel quam euismod, luctus mauris sed, lacinia ex.

Duis neque diam, feugiat at consectetur nec, sollicitudin quis magna. Nullam et leo ut tellus accumsan tempor. Praesent vitae magna porttitor velit iaculis facilisis id et felis. Aenean dignissim tortor eu tincidunt consequat. Duis porta quis dolor quis egestas. Suspendisse cursus dictum aliquet. Phasellus rutrum blandit ex ut euismod. Fusce pulvinar tincidunt lorem consequat tempus. Fusce varius dignissim convallis. Nullam id aliquet sem. Maecenas et lectus gravida mi egestas sodales. Donec eu lobortis urna. Nunc a nisi sodales, semper orci nec, sodales sapien. Fusce vitae ipsum nec ex egestas rhoncus sit amet scelerisque arcu.
</div>

</div>
              
            
!

CSS

              
                * {
  cursor:none;
}
.wrapper {
  background-color:white;
  position:absolute;
  height:100%;
}
.cursor {
  position: absolute;
  width: 30px;
  height: 30px;
  top: -50%;
  left: -50%;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  background-color: white;
  backface-visibility: hidden;
  transition: transform 0.2s ease-out;
  mix-blend-mode: difference;
  z-index: 1000;
  pointer-events: none;
}
.cursor.is-moving {
  transform: scale(0.8);
}

.content_cursor {
  position:relative;
  height:100%;
}
              
            
!

JS

              
                var $cursor = $('.cursor');

function moveCursor(e) {
  $cursor.addClass('is-moving');
  $cursor.css({"top": e.pageY, "left": e.pageX});

  clearTimeout(timer2);

   var timer2 = setTimeout(function() {
       $cursor.removeClass('is-moving');
   }, 300);
}

$(window).on('mousemove', moveCursor);
              
            
!
999px

Console