Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <button type="button" class="btn btn-info btn-lg greg" data-toggle="modal" data-target="#myModal">Open Modal 1</button>

<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      
      <div class="modal-body">
       
<video id="myVideo" class="video-stop" width="320" height="176" controls>
  <source src="https://www.w3schools.com/tags/mov_bbb.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>
         <button type="button"  class="btn btn-default" data-dismiss="modal">Close</button>
        
        
      </div>

    </div>

  </div>
</div>





<button type="button" class="btn btn-info btn-lg greg" data-toggle="modal" data-target="#myModal2">Open Modal 2</button>

<!-- Modal -->
<div id="myModal2" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      
      <div class="modal-body">
       


<video id="myVideo2" class="video-stop" width="320" height="176" controls>
  <source src="https://www.w3schools.com/tags/mov_bbb.mp4" type="video/mp4">
  Your browser does not support HTML5 video.
</video>
         <button type="button"  class="btn btn-default" data-dismiss="modal">Close</button>
        
        
      </div>

    </div>

  </div>
</div>


<div id="logfire">
    <div id="flamegroup">
           <div class="flame" id="fl1"></div>
           <div class="flame" id="fl2"></div>
           <div class="flame" id="fl3"></div> 
    </div>
</div>











              
            
!

CSS

              
                /**
 * CSS3 Animated Flames *
 Improved version using the 'steps' attribute to control the sprite switching
 */

body {background-color:#000}

#logfire {
    position:relative;
    background:url(http://sitepointstatic.com/examples/css3/animation/logfire.jpg?r=2) center top no-repeat;
    height:400px;
    margin-top:100px
    }
#flamegroup {
    margin:0 auto;
    position:relative;
    top:100px;
    width:120px; 
    height:156px;
}
.flame {
    margin:0 auto;
    position:absolute;
    width:100px; 
    height:136px;
    background:url(http://sitepointstatic.com/examples/css3/animation/flame-sprite.png?r=6) 0px 0px no-repeat;
}

#fl1 {
   animation: flicker 1.3s steps(1) infinite;
    top:20px;
    left:10px
}
#fl2 {
   animation: flicker .7s steps(1) infinite;
    top:10px;
    left:20px;
    
}
#fl3 {
   animation: flicker 1.1s steps(1) infinite;
}

@keyframes flicker { /* flame pulses */
    0%, 
    100%{background-position:0px 0px; opacity:.8 }
    25% {background-position:-100px 0px;}
    50% {background-position:-200px 0px;; opacity:.4;}
    75% {background-position:-100px 0px;}
}

              
            
!

JS

              
                var video = "https://www.w3schools.com/tags/mov_bbb.mp4"
$('.modal').on('hide.bs.modal', function(e) {    
    var $if = $(e.delegateTarget).find('.video-stop');
    var src = $if.attr("src");
    $if.attr("src", video );
    $if.attr("src", src);
});
/*
var vid = document.getElementByClassName("stop"); 

function playVid() { 
    vid.play(); 
} 

function pauseVid() { 
    vid.pause(); 
} */
              
            
!
999px

Console