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

              
                <body onhashchange="changeBackground()">
<div class="fluid-container">
        <div class="blurred-background">
                      <img src="https://ibighit.com/bts/images/bts/discography/love_yourself-her/photo01-01.jpg" alt="" value="1" class="current-background-img">
            <img src="https://ibighit.com/bts/images/bts/discography/love_yourself-tear/photo01-01.jpg" alt="" value="2"> 
            <img src="https://ibighit.com/bts/images/bts/discography/love_yourself-answer/photo01-01.jpg" alt="" value="3"> 
        </div>
        <div class="row" style="height: 20vh;">
            <div class="col"> 
                <nav> <h1>Here goes the header</h1> </nav>
            </div>
        </div>
        <div class="row">
            <div class="col">
              <div class="carousel-border"></div>
                <div class="owl-carousel owl-theme" id="main-carousel">
                    <div class="item" data-hash="1">
                            <img src="https://ibighit.com/bts/images/bts/discography/love_yourself-her/photo01-01.jpg" alt="">
                            <div class="carousel-text">
                                <h3>This is the place for Banners Titles and Stuff</h3>
                                <p>And here is room for captions</p>
                            </div>
                    </div>
                    <div class="item" data-hash="2">
                        <img src="https://ibighit.com/bts/images/bts/discography/love_yourself-tear/photo01-01.jpg" alt=""> 
                        <div class="carousel-text">
                            <h3>This is the place for Banners Titles and Stuff</h3>
                            <p>And here is room for captions</p>
                        </div>
                    </div>
                    <div class="item" data-hash="3">
                        <img src="https://ibighit.com/bts/images/bts/discography/love_yourself-answer/photo01-01.jpg" alt=""> 
                        <div class="carousel-text">
                            <h3>This is the place for Banners Titles and Stuff</h3>
                            <p>And here is room for captions</p>
                        </div>
                    </div>
                </div>  
            </div>
        </div>
    </div>
</body>
              
            
!

CSS

              
                /**
 * Owl Carousel v2.3.4
 * Copyright 2013-2018 David Deutsch
 * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
 */
          .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}

.owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791}

nav h1{
  font-family: Arial, Helvetica, sans-serif;
  text-align: center;
}

#main-carousel .owl-dots .owl-dot.active span{
  background: #000000;
  width: 40px;
}

#main-carousel .owl-dots .owl-dot span {
  width: 15px;
  height: 3px;
  margin: 5px;
  border-radius: 20px;
}

.owl-carousel{
  width: 90%;
  object-fit: cover;
  margin: auto;
}

#main-carousel .owl-dots .owl-dot:focus{
  outline: none;
}

.owl-carousel .owl-item img{
  object-fit: cover;
  z-index: -2;
  position: relative;
  height: 550px;
}

.carousel-text{
  position: absolute;
  bottom: 0;
  padding-left: 5%;
  color: white;
  width: 70%;
  /*background: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(22, 21, 21, 0) 51%, rgba(173, 144, 144, 0) 100%);*/
}

.carousel-text h3{
  font-size: 1.5em;
  font-weight: bolder;
  text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
.carousel-text p{
  font-size: 1em;
}

.item{
  background: rgb(0,0,0);
  background: linear-gradient(45deg, rgba(0,0,0,1) 0%, rgba(255,255,255,0) 43%);
}

#main-carousel .owl-nav button.owl-prev span, #main-carousel .owl-nav button.owl-next span{
  position: absolute;
  bottom: 80%;
  font-size: 3em;
  color: white;
  pointer-events: initial;
}
#main-carousel .owl-nav button.owl-prev span{
  right: 10%;
  display: none;
}
#main-carousel .owl-nav button.owl-next span{
  right: 5%;
  display: none;
}
#main-carousel .owl-nav{
  position: absolute;
  width: 100%;
  bottom: 0;
  pointer-events: none;
}
.blurred-background{
  height: 500px;
  position: absolute;
  left: 0;
  z-index: -2;
  width: 100%;
  overflow: hidden;
}

.blurred-background img{
    -webkit-filter: blur(50px);
    filter: blur(50px);
    background-color: rgba(255, 255, 255, 0.5);  
    width: 100%;
    /* Center and scale the image nicely */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: scale(1.2);
    position: absolute;
    -webkit-transition: opacity 1s ease-in-out;
    -moz-transition: opacity 1s ease-in-out;
    -ms-transition: opacity 1s ease-in-out;
    -o-transition: opacity 1s ease-in-out;
    transition: opacity 1s ease-in-out;
    opacity: 0;
}
.current-background-img{
    opacity: 1!important;
}
nav{
  color: white;
}

.carousel-border{
  position: absolute;
  right: 0;
  top: -40px;
  width: 90%;
  height: 600px;
  border-top: .98px solid white;
  border-left: .98px solid white;
  border-top-left-radius: 21px;
  pointer-events: none;
}

@media (min-width: 1200px) {
  .owl-carousel{
    width: 80%;
  }
  .carousel-text{
    width: 30%;
  }
  #main-carousel .owl-nav button.owl-prev span, #main-carousel .owl-nav button.owl-next span{
    display: initial;
  }
  .carousel-border{
    width: 86%;
  }
}
              
            
!

JS

              
                $(document).ready(function(){
  $(".blurred-background img[value='1']").css('opacity',1);
$('#main-carousel').owlCarousel({
    margin:10,
    nav:true,
    loop:true,
    center:true,
    autoHeight:true,
    autoplay:true,
    autoplayTimeout: 10000,
    autoplaySpeed: 1000,
    items: 1,
    URLhashListener:true,
    startPosition: 'URLHash',
})
})

        function changeBackground(){
            var hash = location.hash;
            var image = hash.substring(1);
                      $('.current-background-img').toggleClass('current-background-img');
            $(".blurred-background img[value=" + image + "]").toggleClass('current-background-img');
        }

              
            
!
999px

Console