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

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