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.

Editor Settings

Code Indentation

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

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


              <h1>jquery-rsOverview plugin demo</h1>
<p>Make your own horizontal, vertical or bidirectional scroll bar.</p>

<aside id='doc'></aside> <!-- bidirectional scroll bar for the whole document -->

<div id='overflowed'>
  <img src='' width='653' height='436'>
<!-- vertical, horizontal and bidirectional scroll bars -->
<aside id='elementVert'></aside>
<aside id='elementHoriz'></aside>
<aside id='element'></aside>
<a class="github" href="" target="github">More on GitHub</a>



              #doc {
  position: fixed;
  width: 5em;
  height: 15em;
  right: 1em;
  top: 1em;

#overflowed {
  display: inline-block;
  width: 30em;
  height: 20em;
  border: 1px grey dashed;
  overflow: hidden; /* hide the native scroll bars. I want to use custom ones instead */

#element {
  position: absolute;
  left: 32em;
  top: 10em;
  width: 10em;
  height: 8em;

#elementHoriz {
  position: absolute;
  left: .5em;
  width: 29em;
  top: 26.2em;
  height: 1em;

#elementVert {
  position: absolute;
  top: 7.2em;
  left: 29.6em;
  height: 19em;
  width: 1em;  

.content {
  background-color: rgba(200, 100, 100, .5);
  cursor: crosshair;

.viewport {
  background-color: rgba(0, 0, 0, .5);
  cursor: move;

#element .content {
  background-image: url('');
  background-size: cover;
  overflow: hidden; /* to hide the box-shadow below */

#element .viewport {
  background-color: transparent;
  box-shadow: 0 0 0 3em rgba(255, 255, 255, .4);

a.github {
  position: absolute;
  top: 1em;
  right: 1em;



              // add some content to the page
var $body = $('body').css('white-space', 'nowrap');
for (var i = 0; i < 250; ++i) {
  $body.append('<p>' + new Array(15).join('The quick, brown fox jumps over a lazy dog. --' + i + '--') + '</p>');

// bidirectional scroll bar for the whole document

// bidirectional scroll bar for the #overflowed element
  monitor: $('#overflowed')

// vertical scroll bar for the #overflowed element
  monitor: $('#overflowed'),
  direction: 'vertical'

// horizontal scroll bar for the #overflowed element
  monitor: $('#overflowed'),
  direction: 'horizontal'