cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Vine Responsive Video

A Pen By Captain Anonymous

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

              <iframe class="vine-embed" id="vine-embed" src="https://vine.co/v/b3ADdxPEHaz/embed/simple?audio=0&related=0" width="600" height="600" frameborder="0"></iframe><script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script> 
              //Use fitvids.js to make it responsive
  customSelector: "iframe[src*='vine']"

//Keep track of of window resizing
var h = $(window).height(), w = $(window).width();

//Check when window is resizing
$( window ).resize(function() {
  var window_growing = false;
  var nh = $(window).height(), nw = $(window).width();
  //Check if window is growing when resized
  if(nw > w){
    window_growing = true;
  h = nh; w = nw; // update h and w;
  //If window grows then reload iframe
    $( '.vine-embed' ).attr( 'src', function ( i, val ) { return val;});


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