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

              
                <div class="slider-wrapper">
  <ul class="category-list">
    <li id="residential" class="home-category-item">
      <span class="home-category-number">01</span>
      <span class="home-category-name">Residential</span>
      <span class="home-category-description">Curabitur scelerisque luctus lectus non scelerisque nunc eget justo mattis, pretium neque in</span>
    </li>
    <li id="hotels" class="home-category-item">
      <span class="home-category-number">02</span>
      <span class="home-category-name">Hotels</span>
      <span class="home-category-description">Proin ultricies nunc velit, in scelerisque neque dapibus eget vestibulum faucibus risus ac convallis</span>
    </li>
    <li id="care-home" class="home-category-item">
      <span class="home-category-number">03</span>
      <span class="home-category-name">Care Homes</span>
      <span class="home-category-description">Morbi ac tellus rutrum, ullamcorper est sed, tristique erat nunc suscipit convallis</span>
    </li>
    <li id="student" class="home-category-item">
      <span class="home-category-number">04</span>
      <span class="home-category-name">Student Housing</span>
      <span class="home-category-description">Donec id ex blandit, tempus arcu nec, pharetra nisl phasellus eu quam dui</span>
    </li>
  </ul>
  <div class="home-slider-panel-container">
      <div class="home-slider-text-container">
        <h1 class="home-slider-title">
          Putting Buyers First
        </h1>
        <p class="home-slider-description">
          Properties of the World is a firm of property agents that puts buyers first. We offer properties in both the residential and commercial sectors of the UK property industry, considering a variety of budgets and requirements whilst hand picking these opportunities.
        </p>
      </div>
    <div class="home-inner-slider">
      <div class="slider-panel default"></div>
      <div id="residential-panel" class="slider-panel hidden"></div>
      <div id="hotels-panel" class="slider-panel hidden"></div>
      <div id="care-home-panel" class="slider-panel hidden"></div>
      <div id="student-panel" class="slider-panel hidden"></div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Nunito:300,400,700,800');
@import url('https://fonts.googleapis.com/css?family=Playfair+Display');
html, body{
  margin:0;
  padding:0;
  font-family: 'Nunito', sans-serif;
}
.slider-wrapper{
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  height:100vh;
  position:relative;
}
.slider-wrapper::before{
  content:'';
  width:50%;
  height:50%;
  position:absolute;
  background-color:#f1f1f1;
  top:0;
  left:0;
  z-index:-1;
}
.category-list{
  width:30%;
  list-style: none;
  margin: 0;
  padding: 0;
  padding:6% 5%;
  box-sizing:border-box;
}
.home-category-item{
  margin:20px 0;
  opacity:0.6;
  cursor: w-resize;
  -ms-transition:all .85s cubic-bezier(0.25, 1, 0.33, 1);
  -webkit-transition: all .85s cubic-bezier(0.25, 1, 0.33, 1);
  transition: all .85s cubic-bezier(0.25, 1, 0.33, 1);
}
.home-category-item span{
  display:inline-block;
}
.home-category-number{
  font-size:10px;
  margin-right:15px;
}
.home-category-name{
  font-family: 'Playfair Display', serif;
  font-size:26px;
  -ms-transition:all .85s cubic-bezier(0.25, 1, 0.33, 1);
  -webkit-transition: all .85s cubic-bezier(0.25, 1, 0.33, 1);
  transition: all .85s cubic-bezier(0.25, 1, 0.33, 1);
}
.home-category-description{
  display:block;
  width:100%;
  margin-left:32px;
  font-size:14px;
  line-height:1.5;
  -ms-transition:all .85s cubic-bezier(0.25, 1, 0.33, 1);
  -webkit-transition: all .85s cubic-bezier(0.25, 1, 0.33, 1);
  transition: all .85s cubic-bezier(0.25, 1, 0.33, 1);
}
.home-category-item:hover{
  opacity:1;
}
.home-category-item:hover .home-category-name, .home-category-item:hover .home-category-description{
  -ms-transform: translateX(15px);
  transform: translateX(15px);
  -webkit-transform: translateX(15px);
}
.home-slider-panel-container{
  width:70%;
  height:100%;
  min-height:500px;
  padding:75px 6% 75px 0;
  box-sizing:border-box;
  position:relative;
}
.home-inner-slider{
  width:100%;
  height:100%;
  position:relative;
  overflow:hidden;
}
.home-slider-text-container{
  position:absolute;
  z-index:10;
  background-color:#fff;
  width:50%;
  bottom:35px;
  left:-40px;
  box-sizing:border-box;
  padding:35px;
  box-shadow: 0 60px 135px rgba(0,0,0,0.1), 0 15px 65px rgba(0,0,0,0.14);
}
.home-slider-title{
  font-family: 'Playfair Display', serif;
  font-weight:normal;
  margin-top: 0px;
  color:#111;
}
.home-slider-description{
  font-size:14px;
  line-height:2;
  margin-bottom: 0px;
  color:#111;
  opacity:0.7;
}
.slider-panel{
  width:100%;
  height:100%;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  background-size:cover;
  background-position:center;
  top:0;
  left:0;
  position:absolute;
  -ms-transition:all .85s cubic-bezier(0.25, 1, 0.33, 1);
  -webkit-transition: all .85s cubic-bezier(0.25, 1, 0.33, 1);
  transition: all .85s cubic-bezier(0.25, 1, 0.33, 1);
}
.slider-panel.default{
  background-image:url(https://images.unsplash.com/photo-1479839672679-a46483c0e7c8?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=66d1682c7a6be1ab35bd939ace8e83e2&auto=format&fit=crop&w=2154&q=80);
  position:relative;
}
.slider-panel.hidden{
  left:100%
}
.slider-panel#residential-panel{
  background-image:url(https://images.unsplash.com/photo-1459535653751-d571815e906b?ixlib=rb-0.3.5&s=aa538da834d8bacf765cd1abc2484ca2&auto=format&fit=crop&w=1920&q=80);
}
.slider-panel#hotels-panel{
  background-image:url(https://images.unsplash.com/photo-1432303492674-642e9d0944b2?ixlib=rb-0.3.5&s=db5e99333c2d621fb759725001026781&auto=format&fit=crop&w=1953&q=80);
}
.slider-panel#care-home-panel{
  background-image:url(https://images.unsplash.com/photo-1492889971304-ac16ab4a4a5a?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=058c56771e5c8d1f9adf38dc794f6e0e&auto=format&fit=crop&w=1353&q=80);
}
.slider-panel#student-panel{
  background-image:url(https://images.unsplash.com/photo-1464316325666-63beaf639dbb?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=360a612b6b80a479c3a70f468a9084d0&auto=format&fit=crop&w=1950&q=80);
}
.slider-panel.hidden.is-hover{
  left:0;
  -webkit-animation: ken-burns 7s infinite linear;
  moz-animation: ken-burns 7s infinite linear;
  animation: ken-burns 7s infinite linear;
}
@-webkit-keyframes ken-burns{
  0%{transform:scale(1);}
  100%{transform:scale(1.1);}
}
@keyframes ken-burns{
  0%{transform:scale(1);}
  100%{transform:scale(1.1);}
}
              
            
!

JS

              
                jQuery('.home-category-item').hover(
   function(){
       var id = jQuery(this).attr('id')+'-panel';
       jQuery('#'+id).addClass('is-hover');
   },
 function(){
       var id = jQuery(this).attr('id')+'-panel';
       jQuery('#'+id).removeClass('is-hover');
   }
);
              
            
!
999px

Console