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.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <div id="banner">

<!-- Slider begins here -->
<div id="homepage_slider" class="carousel slide">
  <ol class="carousel-indicators">
		<li data-target="#homepage_slider" data-slide-to="0" class="active"></li>
		<li data-target="#homepage_slider" data-slide-to="1"></li>
		<li data-target="#homepage_slider" data-slide-to="2"></li>
  <!-- Carousel items -->
<div class="carousel-inner">
		<!-- slide #1 -->
		<div data-slide="0" class="item active">
			<div class="slider-hide-on-mobile">
				<video title="1" id="bgvid" autoplay loop muted poster=""><source src="" type="video/webm">Your browser does not support the video tag.</video>
		<!-- slide #2 (image) -->
    <div data-slide="1" class="item">
      <img title="2" alt="image of hotel" src="">
	  <!-- slide #3 (image) -->
		<div data-slide="2" class="item">
      <img title="3" alt="image of apartment" src="">
  </div> <!-- end of '.carousel-inner' -->

	<!-- Carousel nav -->
<!-- 	<div id="slider-play-button"><button class="play-video-button" type="button" title="Play Video"></button></div> -->
	<a class="carousel-control left" href="#homepage_slider" data-slide="prev">&lsaquo;</a>
	<a class="carousel-control right" href="#homepage_slider" data-slide="next">&rsaquo;</a>
  </div> <!-- end of '#homepage_slider' -->
  <!-- Slider ends here -->

</div>  <!-- end of "#banner" -->
              #homepage_slider video { 
    min-height: 100% !important;
    min-width: 100% !important;
	height: auto !important;
    width: auto !important;
	overflow: hidden;

#homepage_slider img {
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border: 0;

.carousel-inner>.item>img {
  display: block;
  line-height: 1;

/* button to display if user choses to not autoplay the video: */
#slider-play-button button { 
	display: inline-block;
	border: 0.06666em solid #fff;
	font-size: 2rem;
	background: rgba(255,255,255,0.23);
	color: #fff;
	cursor: pointer;
	transition: .3s background;
	line-height: 1.3em;
	height: 1.5em;
	width: 2.5em;
	border-radius: 0.3em;
	position: absolute;
	opacity: .7;
	right: 1em;
	top: 20%;
.play-video-button:before {
	font-family: FontAwesome;
	content: "\f04b";
.pause-video-button:before {
	font-family: FontAwesome;
	content: "\f04c";
              // without this script, the slider doesn't start on it's own:
  !function ($) {

// if user chooses to not autoplay the video, the button should be uncommented in html and this script will make the button work:
var vid = document.getElementById("bgvid");
var playButton = document.querySelector("#slider-play-button button");

playButton.addEventListener("click", function() {
  if (vid.paused) {;
  } else {
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.