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


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.


			<p>This page is a demo of a <a href="">Noframe.js</a> - a very basic lightweight plugin that makes iframes or embedded content responsive.</p>
      <p>More deeply, this means that it makes elements scale at a fixed ratio.</p>
			<iframe width="560" height="315" src="" frameborder="0" allowfullscreen></iframe>
			<p>This is an <code>iframe</code> that contains a video.</p>


                figure,p{margin:1rem 0}figcaption{margin:.5rem 0;text-align:center}article{margin:1rem;width:100%;}@media screen and (min-width:768px){article{margin:1rem auto;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.noframe = factory());
}(this, (function () { 'use strict';

function noframe(target, container) {
  var frames = typeof target === 'string' ? document.querySelectorAll(target) : target;
  if (!('length' in frames)) frames = [frames];
  for (var i = 0; i < frames.length; i += 1) {
    var frame = frames[i];
    var isContainerElement = typeof container !== 'undefined' && document.querySelector(container);
    var parent = isContainerElement ? document.querySelector(container) : frame.parentElement;
    var h = frame.offsetHeight;
    var w = frame.offsetWidth;
    var styles =;
    var maxW = w + 'px';
    if (isContainerElement) {
      maxW = window.getComputedStyle(parent, null).getPropertyValue('max-width');
      styles.width = '100%';
      styles.maxHeight = 'calc(' + maxW + ' * ' + h + ' / ' + w + ')';
    } else {
      var maxH = void 0;
      styles.display = 'block';
      styles.marginLeft = 'auto';
      styles.marginRight = 'auto';
      var fullW = maxW;
      if (w > parent.offsetWidth) {
        fullW = parent.offsetWidth;
        maxH = fullW * h / w;
      } else maxH = w * (h / w);
      styles.maxHeight = maxH + 'px';
      styles.width = fullW;
    var cssHeight = 100 * h / w;
    styles.height = cssHeight + 'vw';
    styles.maxWidth = '100%';

return noframe;