Pen Settings

HTML

CSS

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

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

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.

HTML

              
                <section class="video-block">
	<div class="container">
		<div class="row">
			<div class="video-tab clearfix">
				<h2 class="video-tab-title">Video Gallery with bootstrap tab</h2>
				<div class="col-md-7 pr-0">
					<div class="tab-content">
						<div class="tab-pane active fade in" id="videoTab01">
							<a class="play-icon" data-video="https://www.youtube.com/embed/BD5ul7MLvds?autoplay=1">
								<img class="play-button" src="https://user-images.githubusercontent.com/16266381/60864229-d403b780-a244-11e9-909a-a8a01b6e1d50.png" alt="play-button">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60862959-057a8400-a241-11e9-9e09-e50f827e4881.jpg" alt="post-thumbnail"/>
								</div>
							</a>
						</div>
						<div class="tab-pane fade" id="videoTab02">
							<a class="play-icon" href="javascript:void(0)" data-video="https://www.youtube.com/embed/pRbhveLaQ9c?autoplay=1">
								<img class="play-button" src="https://user-images.githubusercontent.com/16266381/60864229-d403b780-a244-11e9-909a-a8a01b6e1d50.png" alt="play-button">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60864371-3957a880-a245-11e9-92ac-61673c2f0204.jpg" alt="post-thumbnail" />
								</div>
							</a>
						</div>
						<div class="tab-pane fade" id="videoTab03">
							<a class="play-icon" href="javascript:void(0)" data-video="https://www.youtube.com/embed/FpnqHvmJU4U?autoplay=1">
								<img class="play-button" src="https://user-images.githubusercontent.com/16266381/60864229-d403b780-a244-11e9-909a-a8a01b6e1d50.png" alt="play-button">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60864450-791e9000-a245-11e9-97d3-ab6b33841df7.jpg" alt="post-thumbnail" />
								</div>
							</a>
						</div>
						<div class="tab-pane fade" id="videoTab04">
							<a class="play-icon" href="javascript:void(0)" data-video="https://www.youtube.com/embed/YLZuvTBmmwo?autoplay=1">
								<img class="play-button" src="https://user-images.githubusercontent.com/16266381/60864229-d403b780-a244-11e9-909a-a8a01b6e1d50.png" alt="play-button">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60864540-b1be6980-a245-11e9-933c-f7782a29b4b7.jpg" alt="post-thumbnail" />
								</div>
							</a>
						</div>
						<div class="tab-pane fade" id="videoTab05">
							<a class="play-icon" href="javascript:void(0)" data-video="https://www.youtube.com/embed/_HTXMhKWqnA?autoplay=1">
								<img class="play-button" src="https://user-images.githubusercontent.com/16266381/60864229-d403b780-a244-11e9-909a-a8a01b6e1d50.png" alt="play-button">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60865619-3611ec00-a248-11e9-8ddf-5d8c458072d7.jpg" alt="post-thumbnail" />
								</div>
							</a>
						</div>
						<div class="tab-pane fade" id="videoTab06">
							<a class="play-icon" href="javascript:void(0)" data-video="https://www.youtube.com/embed/9O5PhuW927w?autoplay=1">
								<img class="play-button" src="https://user-images.githubusercontent.com/16266381/60864229-d403b780-a244-11e9-909a-a8a01b6e1d50.png" alt="play-button">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60865766-8721e000-a248-11e9-97d6-fad5269c29ff.jpg" alt="post-thumbnail" />
								</div>
							</a>
						</div>
					</div>
				</div>

				<div class="col-md-5 pl-0">
					<ul class="nav nav-tabs">
						<li class="active">
							<a href="#videoTab01" data-toggle="tab">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60862959-057a8400-a241-11e9-9e09-e50f827e4881.jpg" alt="post-thumbnail"/>
								</div>
								<h3>12 Dangerous Side Effects of Working Out</h3>
							</a>
						</li>
						<li>
							<a href="#videoTab02" data-toggle="tab">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60864371-3957a880-a245-11e9-92ac-61673c2f0204.jpg" alt="post-thumbnail"/>
								</div>
								<h3>7 Food Combinations That Can Ruin Your Health</h3>
							</a>
						</li>
						<li>
							<a href="#videoTab03" data-toggle="tab">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60864450-791e9000-a245-11e9-97d3-ab6b33841df7.jpg" alt="post-thumbnail"/>
								</div>
								<h3>8 Hairstyles That Show a Man’s True Character</h3>
							</a>
						</li>
						<li>
							<a href="#videoTab04" data-toggle="tab">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60864540-b1be6980-a245-11e9-933c-f7782a29b4b7.jpg" alt="post-thumbnail" />
								</div>
								<h3>9 Signs You're Eating Too Much Salt</h3>
							</a>
						</li>
						<li>
							<a href="#videoTab05" data-toggle="tab">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60865619-3611ec00-a248-11e9-8ddf-5d8c458072d7.jpg" alt="post-thumbnail" />
								</div>
								<h3>iPhone X Impressions & Hands On!</h3>
							</a>
						</li>
						<li>
							<a href="#videoTab06" data-toggle="tab">
								<div class="post-thumbnail">
									<img class="img-responsive" src="https://user-images.githubusercontent.com/16266381/60865766-8721e000-a248-11e9-97d6-fad5269c29ff.jpg" alt="post-thumbnail" />
								</div>
								<h3>Driving a Tesla Model 3! [Auto Focus Ep. 1]</h3>
							</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</div>
</section>
              
            
!

CSS

              
                /* Variables */
@import url('https://fonts.googleapis.com/css?family=Montserrat:400,600,700');

$primary-color: #479DC8;
$white: #fff;
$black: #000;
$primary-font:'Montserrat', sans-serif;

body{
  font-family: $primary-font;
}

.video-block {
  background-image: linear-gradient(to top, #1e3c72 0%, #1e3c72 1%, #2a5298 100%);
  color: $white;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-tab-title {
  color: $white;
  font-size: 18px;
  text-transform: uppercase;
  margin: 0 0 30px 15px;
}

.video-tab {
  .post-overlay-wrapper {
    min-height: 430px;
    .post-content {
      padding: 35px;
    }
  }
  .post-title {
    font-size: 24px;
    line-height: 30px;
    font-weight: normal;
  }
  .nav-tabs{
    border-bottom: none;
    margin-left: 30px;
    height: 376px;
    overflow-y: auto;
    &::-webkit-scrollbar
    {
      width: 8px;
      background-color: $white;
      border-radius: 10px;
    }
    &::-webkit-scrollbar-thumb
    {
      border-radius: 10px;
      background-color: $primary-color;
    }
  }
  .nav-tabs{
    li{
      width: 100%;
      display: block;
      min-height: 100px;
      a {
        background: none;
        border: 0;
        padding: 0;
        border: 0;
        .post-thumbnail {
          img {
            max-width: 100px;
          }
          float: left;
          margin-right: 20px;
          position: relative;
          overflow: hidden;
        }
        h3 {
          color: $white;
          font-weight: normal;
          line-height: 28px;
          font-size: 16px;
          margin: 0;
        }
      }
    }
  }
}

.play-icon {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  &:hover{
    cursor: none;
  }
  .play-button{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: all .1s ease;
  }
  &:before{
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    transition: all .3s ease; 
    background: rgba($color: $black, $alpha: .4);
    z-index: 2;
  }
}
.video-tab{
  iframe{
    width: 100%;
    min-height: 369px;
    border: none;
    background: $black;
    padding: 10px;
    border-radius: 6px;
  }
}

// Bootstrap Overrides
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover{
  background: transparent;
  border: none;
}
              
            
!

JS

              
                $('.play-icon').click(function () {
		var video = '<iframe allowfullscreen src="' + $(this).attr('data-video') + '"></iframe>';
		$(this).replaceWith(video);
	});

	$('.play-icon').mousemove(function (e) {
		var parentOffset = $(this).offset();
		var relX = e.pageX - parentOffset.left;
		var relY = e.pageY - parentOffset.top;
		$(".play-button").css({ left: relX, top: relY});
	});
	$('.play-icon').mouseout(function() {
		$(".play-button").css({ left: '50%', top: '50%'});
	});
              
            
!
999px

Console