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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

              <div class="container">
<div id="demo">
  <div contenteditable="">Way to detect overflow event support and use it with graceful degradation.<br/>Works on Chrome, Safari and Firefox.<br/>Now insert some text here to make it `overflow`.<br></div>
<div id="status"></div>
<a href="https://github.com/zmmbreeze/useOverflowEvent" target="_top"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
              body {
  margin: 0;
.container {
  width: 640px;
  margin: 0 auto;
#demo {
    margin: 2em 0 0;
    padding: 0.5em;
    height: 80px;
    overflow: auto;
    line-height: 1.5;
    border: 2px solid #CCD1D9;
    border-bottom-width: 1px;
#demo div {
    outline: none;
#status {
    margin-bottom: 2em;
    padding: 5px 1em;
    color: #967ADC;
    border: 2px solid #CCD1D9;
    border-top: none;
    background: #EAEAEA;
              useOverflowEvent(function (addOverflowListener) {
  var status = document.getElementById('status');
  status.innerHTML = 'Overflow event ' + (addOverflowListener ? 'supported' : 'not supported');
  if (!addOverflowListener) {
    // browser not support

  var container = document.getElementById('demo');
  addOverflowListener(container, 'over', function () {
    status.innerHTML = 'overflow';
  addOverflowListener(container, 'under', function () {
    status.innerHTML = 'underflow';
Loading ..................