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.

            
              <div class="container">
  <div class="row">
    <div class="col-sm-12 col-md-7">
      <div class="embed-responsive embed-responsive-16by9 mbl-video">
		  <a href="#"><i class="fa fa-play-circle-o fa-4x centered"></i></a>
      <img src="https://baconmockup.com/640/360" />
      <!--<iframe class="embed-responsive-item" width="640" height="360" src="https://www.youtube-nocookie.com/embed/HxtxwGplKy4?rel=0&amp;showinfo=0;autoplay=1" frameborder="0" allowfullscreen></iframe>-->
    </div>
	  </div>
    <div class="col-sm-12 col-md-5">
      <h1 class="text-uppercase">Bacon</h1>
      <p class="lead">Bacon ipsum dolor amet biltong swine jerky short ribs bacon bresaola. Prosciutto tongue tri-tip rump kevin filet mignon. Prosciutto kevin shankle tail pork loin filet mignon. Tail cupim rump strip steak leberkas filet mignon.</p>
      <button type="button" class="btn btn-primary">Learn More</button>
    </div>
  </div>
  
  <!--<div class="modal fade myModal">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    </div>
     <div class="modal-content">
       <iframe width="640" height="360" src="https://www.youtube-nocookie.com/embed/RtNuwdOTkvw?rel=0&amp;showinfo=0;autoplay=0" frameborder="0" allowfullscreen></iframe>
    </div>
  </div-->
            
          
!
            
              body {
	width: 100%;
	background: #efefef;
	color: #454545;
}

h1 {
	text-shadow: 1px 1px 1px rgba(0,0,0,0.3);
}

.container {
	margin-top: 50px;
}

.mbl-video {
	position: relative;
	padding-bottom: 56.25%;
	/* 16:9 */
	height: 0;
	& img {
		position: absolute;
		display: block;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: 20;
		cursor: pointer;
	}
	& iframe {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
}


/* image poster clicked, player class added using js */

.mbl-video.player img {
	display: none;
	&:after {
		display: none;
	}
}

a {
	color: #fff;
	opacity: 0.6;
}

a:hover,
a:focus,
a:active {
	color: #333;
	opacity: 1;
}

.centered {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 120px;
}
            
          
!
            
              $(function() {
	var videos = $(".mbl-video");

	videos.on("click", function() {
		var elm = $(this),
			conts = elm.contents(),
			le = conts.length,
			ifr = null;

		for (var i = 0; i < le; i++) {
			if (conts[i].nodeType == 8) ifr = conts[i].textContent;
		}

		elm.addClass("player").html(ifr);
		elm.off("click");
	});
});
            
          
!
999px
Loading ..................

Console