Pen Settings



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


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


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.


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.


			<p>This page is a demo of a <a href="">Reframe.js</a> - a very basic lightweight plugin that makes iframes or any div responsive.</p>
			<p>Reframe.js makes all iframes selected responsive.</p>
			<iframe width="560" height="315" src="" frameborder="0" allowfullscreen></iframe>
			<figcaption>This is an <code>iframe</code> that contains a video.</figcaption>


                html{box-sizing:border-box;font-family:sans-serif;-webkit-text-size-adjust:2;-ms-text-size-adjust:2;text-size-adjust:2}*,:after,:before{box-sizing:inherit}body{color:#000;font-family:sans-serif;margin:0}article,figcaption,figure,footer,header,main{display:block}video{display:inline-block}[hidden]{display:none}code{font-family:monospace,monospace}select{font:inherit;margin:0;overflow:visible;text-transform:none}[type=reset],[type=submit],html [type=button]{-webkit-appearance:button}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}body,figure,h1,h2,h3,h4,h5,h6,p{margin:0;padding:0}figure,h1,h2,h3,h4,h5,h6,p{margin-bottom:.5rem}h1,h2,h3,h4,h5,h6{font-weight:400}a{background-color:transparent;color:#000;text-decoration:none}a:active,a:hover{outline-width:0}.js-reframe{padding-top:56.25%;position:relative;width:100%}.js-reframe iframe{height:100%;left:0;position:absolute;top:0;width:100%}figure,p{margin:1rem 0}figcaption{margin:.5rem 0;text-align:center}article{margin:1rem auto;max-width:calc(100% - 4rem)}@media screen and (min-width:768px){article{max-width:700px}}footer p,h1{text-align:center}footer,h1{margin:2rem auto}


                (function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  (global.reframe = factory());
}(this, (function () { 'use strict';

function Reframe(target, cName) {
  var frames = typeof target === 'string' ? document.querySelectorAll(target) : target;
  if (!('length' in frames)) {
    frames = [frames];
  var classname = cName || 'js-reframe';
  for (var i = 0; i < frames.length; i++) {
    var frame = frames[i];
    var hasClass = frame.className.split(' ').indexOf(classname);
    if (hasClass >= 0) return false;
    var div = document.createElement('div');
    var height = frame.offsetHeight;
    var width = frame.offsetWidth;
    var padding = height / width * 100; = padding + '%';
    frame.height = frame.width = '';
    div.className += classname;
    frame.parentNode.insertBefore(div, frame);
  return this;
function reframe (target, cName) {
  return new Reframe(target, cName);

if (window.$ || window.jQuery || window.Zepto) {
  window.$.fn.reframe = function reframeFunc(cName) {
    return new Reframe(this, cName);

return reframe;