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.

+ 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.

            
              .container
  h1.title Our Milestones
  .timeline
    .timeline-nav
      .timeline-nav__item 1985
      .timeline-nav__item 1988
      .timeline-nav__item 1998
      .timeline-nav__item 2006
      .timeline-nav__item 2008
      .timeline-nav__item 2010
      .timeline-nav__item 2012
      .timeline-nav__item 2013
      .timeline-nav__item 2015
      .timeline-nav__item 2016
    
    .timeline-wrapper
      .timeline-slider
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=11`, data-year=`1985`)       
            span.timeline-year 1985
            .timeline-slide__content
              h4.timeline-title Our first project
              p.timeline-text First project for the leading film actress Jamuna Barua, wife of Pramathesh Barua the legendary actor, director, and screenwriter
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=12`, data-year=`1988`)       
            span.timeline-year 1988
            .timeline-slide__content
              h4.timeline-title Our first project
              p.timeline-text First project for the leading film actress Jamuna Barua, wife of Pramathesh Barua the legendary actor, director, and screenwriter
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=13`, data-year=`1998`)       
            span.timeline-year 1998
            .timeline-slide__content
              h4.timeline-title Our nice super title
              p.timeline-text Lorem ipsum dolor site amet, consectetur adipscing elit, sed do eisumod tempor incididut ut labore et dolore magna aliqua. Ut enim ad mimim venjam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=13`, data-year=`2006`)       
            span.timeline-year 2006
            .timeline-slide__content
              h4.timeline-title Our nice super title
              p.timeline-text Lorem ipsum dolor site amet, consectetur adipscing elit, sed do eisumod tempor incididut ut labore et dolore magna aliqua. Ut enim ad mimim venjam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=13`, data-year=`2008`)       
            span.timeline-year 2008
            .timeline-slide__content
              h4.timeline-title Our nice super title
              p.timeline-text Lorem ipsum dolor site amet, consectetur adipscing elit, sed do eisumod tempor incididut ut labore et dolore magna aliqua. Ut enim ad mimim venjam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=13`, data-year=`2010`)       
            span.timeline-year 2010
            .timeline-slide__content
              h4.timeline-title Our nice super title
              p.timeline-text Lorem ipsum dolor site amet, consectetur adipscing elit, sed do eisumod tempor incididut ut labore et dolore magna aliqua. Ut enim ad mimim venjam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=13`, data-year=`2012`)       
            span.timeline-year 2012
            .timeline-slide__content
              h4.timeline-title Our nice super title
              p.timeline-text Lorem ipsum dolor site amet, consectetur adipscing elit, sed do eisumod tempor incididut ut labore et dolore magna aliqua. Ut enim ad mimim venjam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=13`, data-year=`2013`)       
            span.timeline-year 2013
            .timeline-slide__content
              h4.timeline-title Our nice super title
              p.timeline-text Lorem ipsum dolor site amet, consectetur adipscing elit, sed do eisumod tempor incididut ut labore et dolore magna aliqua. Ut enim ad mimim venjam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=13`, data-year=`2015`)       
            span.timeline-year 2015
            .timeline-slide__content
              h4.timeline-title Our nice super title
              p.timeline-text Lorem ipsum dolor site amet, consectetur adipscing elit, sed do eisumod tempor incididut ut labore et dolore magna aliqua. Ut enim ad mimim venjam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
          .timeline-slide(style=`background-image: url(https://unsplash.it/1920/600?image=13`, data-year=`2016`)       
            span.timeline-year 2016
            .timeline-slide__content
              h4.timeline-title Our nice super title
              p.timeline-text Lorem ipsum dolor site amet, consectetur adipscing elit, sed do eisumod tempor incididut ut labore et dolore magna aliqua. Ut enim ad mimim venjam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
            
          
!
            
              *{
  box-sizing: border-box;  
}
$white: #fff;
$black: #000;
$primary: #003471;
$gray: #616161;
$orange: #ff9900;

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  padding: 0;
  margin: 0;
  
}
.container {   
  height: 100%;  
  background-color: $primary;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.title {
  font-size: 38px;
  color: #fff;
  font-weight: 300;
}
.timeline{
  width: 100%;
  position: relative;
  margin-top: 100px;
  
  &-nav{
    &__item{
      width: auto;
      height: auto;      
      text-align: center;
      opacity: 0.5;
      background: transparent;
      color: #afc9f6;
      margin: 15px 25px !important;
      position: relative;
      font-size: 14px;
      line-height: 28px;
      font-weight: 400;
      outline: none;
      cursor: pointer;
      &::before {
        content: "";
        position: absolute;
        top: 30px;
        left: 50%;
        transform: translateX(-50%);
        width: 10px;
        height: 10px;
        border-radius: 100%;
        background-color: #afc9f6;
        transition: .2s;
      }
      
      &.slick-current{
        color: $orange;
        opacity: 1;
        &::before { 
          background-color: $orange;
        }
      }
    }
  }
  
  &-wrapper{
    position: relative;
    width: 100%;
    height: 580px;
    margin: 60px auto;
		
		@media (max-width: 500px){
			height: 1000px;
			max-height: 900px;
		}
    
  }
  &-slider{
    height: 100%;    
  }
  .slick-list{
    height: 100%;
      @media (min-width: 1080px){
          padding: 0 180px !important;
      }    
  }
  .slick-track{
    height: 100%;
  }
  &-slide{    
    position: relative;
    overflow: hidden;
    background-repeat: no-repeat;
    outline: none;
    background-size: auto 400px, cover;
    background-position: top;
    margin: 0 24px;
    width: 80%;
		z-index: 1;
		&:after{
			content: "";
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
      height: 100%;
      background-color: rgba($primary, .8);
			z-index: 2;
		}
    
    &__content{
			z-index: 5;
      position: absolute;
      top: 220px;
      background: #ffffff;
      width: 80%;
      left: 50%;      
      transform: translate(-50%, 0px);
      padding: 40px;
      opacity: 0;
      transition: opacity 1s;
			@media (max-width: 500px){
				width: 100%;
				// transform: translate(-50%, 0px);
			}
    }    
  }
  &-year{
		z-index: 5;
    font-size: 35px;
    color: #ffffff;
    background: $orange;
    padding: 15px 26px;
    transition: opacity 1.2s;
    position: absolute;
    right: 0;
    opacity: 0;
  }
  &-title{
    color: $orange;
    font-size: 26px;
    line-height: 30px;
    font-weight: 400;
  }
  &-text{
    font-size: 18px;
    line-height: 28px;
    color: #666666;
  }
  
  .slick-current{
		&:after{
			background-color: rgba($primary, 0);
		}
    .timeline-year{
      opacity: 1;
    }
    .timeline-slide__content{
      opacity: 1;
    }
  }
  
}

            
          
!
            
              $(function(){
   $('.timeline-nav').slick({
      slidesToShow: 12,
      slidesToScroll: 1,
      asNavFor: '.timeline-slider',
      centerMode: false,
      focusOnSelect: true,
       mobileFirst: true,
      arrows: false,
      infinite:false,
       responsive: [
           {
          breakpoint: 768,
          settings: {
            slidesToShow: 8,
           }
          },
         {
          breakpoint: 0,
          settings: {
            slidesToShow: 4,
            slidesToScroll: 2,
          }
        }
     ]
  });
  
   $('.timeline-slider').slick({
      slidesToShow: 1,
      slidesToScroll: 1,
      arrows: false,
      asNavFor: '.timeline-nav',     
      centerMode: true,     
      cssEase: 'ease',
       edgeFriction: 0.5,
       mobileFirst: true,
       speed: 500,
       responsive: [
         {
          breakpoint: 0,
          settings: {
              centerMode: false
          }
        },
           {
          breakpoint: 768,
          settings: {
              centerMode: true
          }
        }
     ]
  });
 
});
            
          
!
999px
🕑 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.
Loading ..................

Console