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.

			<p>This page is a demo of a <a href="https://github.com/yowainwright/reframe.js">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="https://www.youtube.com/embed/6FQsIfE7sZM" 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;
    div.style.paddingTop = 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;


Loading ..................