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

              
                <section id="benefits-section">
      <div class="container-fluid">
        <div class="row">
          <div class="col-md-12">
            
          </div>
        </div>

        <div class="row minH">
          <div class="col-md-12">
            <div class="benefit-wrapper">
              <div class="icon-list-wrapper">
                <ul class="icon-list">
                  <li id="anchor1" class="icon-item active"><i class="fas fa-graduation-cap"></i> <span>Expertise</span></li>
                  <li id="anchor2" class="icon-item"><i class="fas fa-user-tie"></i> <span>They Work For You</span></li>
                  <li id="anchor3" class="icon-item"><i class="fas fa-headset"></i> <span>Claims Assistance</span></li>
                  <li id="anchor4" class="icon-item"><i class="fas fa-balance-scale"></i> <span>Risk Assessment</span></li>
                  <li id="anchor5" class="icon-item"><i class="fas fa-file-check"></i> <span>Simplify the Process</span></li>
                  <li id="anchor6" class="icon-item"><i class="fas fa-shopping-basket"></i> <span>Market Access</span></li>
                </ul>
              </div>

              <div class="benefit-content-wrapper">
                <div class="benefit-content-inner">

                  <div id="list-content" class="list-content">
                    <div id="section-1" class="box">
                      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum ut neque ac elementum. Mauris non pulvinar turpis, ac dapibus nibh. Sed aliquet vel diam eget malesuada. Etiam non risus metus. Nulla felis libero, sollicitudin at velit lacinia, fermentum facilisis enim. In consectetur odio a bibendum aliquet. Sed dapibus ullamcorper risus, sit amet tincidunt lacus rhoncus et. Phasellus purus lectus, ullamcorper et luctus in, tristique elementum justo. Ut blandit venenatis mattis. Donec at nisi eros. Nunc sed posuere ante. Fusce ut dolor lorem. Fusce orci tellus, consectetur eu eros at, commodo commodo nunc. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Mauris eleifend lorem quis est gravida interdum. Nam dignissim dui vitae euismod faucibus.</p>
                    </div>

                    <div id="section-2" class="box">
                      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum ut neque ac elementum. Mauris eleifend lorem quis est gravida interdum. Nam dignissim dui vitae euismod faucibus.</p>
                    </div>

                    <div id="section-3" class="box">
                      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam interdum ut neque ac elementum. Mauris non pulvinar turpis, ac dapibus nibh. Sed aliquet vel diam eget malesuada. Etiam non risus metus. Nulla felis libero, sollicitudin at velit lacinia, fermentum facilisis enim. In consectetur odio a bibendum aliquet. Sed dapibus ullamcorper risus, sit amet tincidunt lacus rhoncus et. Phasellus purus lectus, ullamcorper et luctus in, tristique elementum justo. Ut blandit venenatis mattis. Donec at nisi eros. Nunc sed posuere ante. Fusce ut dolor lorem. Fusce orci tellus, consectetur eu eros at, commodo commodo nunc. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. </p>
                    </div>

                    <div id="section-4" class="box">
                      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam consequat quam nec consequat dapibus. Sed vulputate orci vel iaculis consequat. Nulla facilisi. Nam rhoncus mi et facilisis varius. Quisque porta, sapien a volutpat egestas, magna augue sollicitudin urna, vitae condimentum leo nunc ut sapien. </p>
                    </div>

                    <div id="section-5" class="box">
                      <p>Lorem ipsum dolor Aenean imperdiet, elit non fermentum rhoncus, diam felis mattis justo, at consectetur risus elit non ante. Phasellus euismod, ligula quis scelerisque pretium, risus urna dictum leo, vitae interdum elit arcu a massa. Cras id nisl ac tortor venenatis malesuada et vel turpis. Quisque tortor mi, tincidunt semper bibendum a, lacinia eget urna.</p>
                    </div>

                    <div id="section-6" class="box">
                      <p>Proin sagittis mollis justo, non lobortis dolor cursus eget. Nullam gravida nisl interdum mi iaculis, sit amet ullamcorper est pretium. Aenean suscipit orci in ipsum imperdiet rutrum. Praesent magna nunc, porttitor elementum bibendum eu, efficitur vel neque. In sed elit porta, lacinia metus eget, aliquam quam. Nam quis turpis arcu. </p>
                    </div>
                  </div>

                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </section>
              
            
!

CSS

              
                :root{
	--fontFamily: sans-serif;
	--fontWeightReg: 400;
	--fontWeightDemi: 600;
	--fontWeightXBold: 800;
	
	--primaryColour: #29488D;
	--primaryHoverColour: #29488D;
	
	--secondaryColour: #F8D90F;
	--secondaryHoverColour: #F8D90F;

	--thirdColour: #0091B6;
	--thirdHoverColour: #0091B6;

	--white: #ffffff;
	--black: #000000;
}

#benefits-section {
	position: relative;
  	width: 100%;
  	min-height: 700px;
  	padding: 100px 0;
  	overflow: hidden;
}
#benefits-section .benefit-wrapper {
	text-align: center;
}
#benefits-section .benefit-wrapper .icon-list-wrapper { 
	margin-bottom: 40px; 
}
#benefits-section .benefit-wrapper .icon-list-wrapper ul.icon-list { 
	padding: 0; 
	margin: 0; 
	list-style: none; 
}
#benefits-section .benefit-wrapper .icon-list-wrapper ul.icon-list li.icon-item { 
	display: inline-block; 
	vertical-align: top; 
	width: 90px; 
	margin: 0 10px; 
}
#benefits-section .benefit-wrapper .icon-list-wrapper ul.icon-list li.icon-item i { 
	display: block; 
	font-size: 36px;
	margin-bottom: 10px;
	color: var(--primaryColour);
}
#benefits-section .benefit-wrapper .icon-list-wrapper ul.icon-list li.icon-item span { 
	display: block;
	font-size: 14px;
	line-height: 14px;
	font-weight: var(--fontWeightDemi);
	text-transform: uppercase;
}

#benefits-section .benefit-wrapper .icon-list-wrapper ul.icon-list li.icon-item.active { 
	
}
#benefits-section .benefit-wrapper .icon-list-wrapper ul.icon-list li.icon-item.active i { 
	color: var(--secondaryColour);
}
#benefits-section .benefit-wrapper .icon-list-wrapper ul.icon-list li.icon-item.active span { 
	color: var(--primaryColour);
}

#benefits-section .benefit-content-wrapper {

}
#benefits-section .benefit-content-wrapper .benefit-content-inner {
	display: inline-flex;
	/*flex-direction: column;*/
	align-items: center;
	text-align: center;
}
#benefits-section .benefit-content-wrapper .benefit-content-inner .list-content {
	display: flex;

}
#benefits-section .benefit-content-wrapper .benefit-content-inner .list-content > .box {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 100vw;
	
}
#benefits-section .benefit-content-wrapper .benefit-content-inner .list-content > .box p {
	width: 60vw;
	border: 4px solid var(--secondaryColour);
	padding: 20px 40px;
	font-weight: var(--fontWeightDemi);
	text-align: center;
	color: var(--black);
}
              
            
!

JS

              
                var horizontalSlide = gsap.timeline({paused: true})
  	// animate panels
  	
	horizontalSlide.to("#list-content", {x: "0vw", duration: 2})	
					.to("#list-content", {x: "-100vw", duration: 2})
					.to("#list-content", {x: "-100vw", duration: 2})
					.to("#list-content", {x: "-100vw", duration: 2})
					.to("#list-content", {x: "-100vw", duration: 2})
					.to("#list-content", {x: "-100vw", duration: 2});
	horizontalSlide.play();
	
	var scenes = {
	  'scene1': {
	    'section-1': 'anchor1'
	  },
	  'scene2': {
	    'section-2': 'anchor2'
	  },
	  'scene3': {
	    'section-3': 'anchor3'
	  },
	  'scene4': {
	    'section-4': 'anchor4'
	  },
	  'scene5': {
	    'section-5': 'anchor5'
	  },
	  'scene6': {
	    'section-6': 'anchor6'
	  }
	}

	for(var key in scenes) {
	  // skip loop if the property is from prototype
	  if (!scenes.hasOwnProperty(key)) continue;
	  console.log(key, scenes[key]);
	  
	  var obj = scenes[key];

	  for (var prop in obj) {
	    // skip loop if the property is from prototype
	    if(!obj.hasOwnProperty(prop)) continue;

	    console.log(obj, prop);

	    new ScrollMagic.Scene({
	    	triggerElement: '#' + prop,
	    	triggerHook: 0.5,
			//duration: "400%" 
	    })
	    .setClassToggle('#' + obj[prop], 'active')
	    .setTween(horizontalSlide)
	    .addIndicators() // add indicators (requires plugin)
	    .addTo(controller);
	  }
	}
              
            
!
999px

Console