Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

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.

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

              
                <header class="asHeader">
	<nav class="asNaviBar uk-navbar-container uk-navbar"> 
		
		<div class="uk-navbar-right ">
            <ul class="uk-flex uk-flex-middle">
                <li>MENU</li>
                <li class="asMenuClose">CLOSE</li>
                <li class="asHamburger uk-float-right">
                    <a class="btn-open">
                    <div class="asHamburger-btn uk-flex-middle">
                      <span class="bar"></span>
                      <span class="bar"></span>
                      <span class="bar"></span>
                    </div>
                    </a>
                </li>	
            </ul>
		  </div>

	</nav>	
</header>  
<div class="overlay">
	<div class="wrap">
		<ul class="wrap-nav">
			<li><a href="#Section01">Section01</a></li>
			<li><a href="#Section02">Section02</a></li>
			<li><a href="#Section04">Section04</a></li>


		</ul>
	</div>
	
</div>



	<section id="Section01" class="landing uk-cover-container vh">
    <h1> Section 1 </h1>
	</section>	
	<div class="asContent" id="asContent">
	<section id="Section02" class="MessageFromOurLeader">
		<div class="asElementVertical"><img src="images/element.svg"></div>
		<div class="wrapper">  
			<div class="point">
				<div class="uk-container">
					<div class="uk-grid">
						<div class="uk-width-2-3@m">
							<article>
							<div class="asElement asWhite asElementWhite"></div>
							<h1 class="asWhite">Section 2</h1>
							<h3 class="asWhite">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec scelerisque massa ullamcorper ante mattis tempus. Nullam vulputate maximus massa, ut malesuada nibh</h3>
							<h4 class="asYellow asFontBold uk-margin-remove-bottom">Donec scelerisque massa</h4>
							<p class="asWhite uk-margin-remove">Donec scelerisque massa</p>
								
							
								
							<a href="#"><div class="asButton uk-margin-medium-top uk-margin-large-bottom">download</div></a>
						  	</article>
						</div>
						<div class="uk-width-1-3@m asLeaderImage">
							 <img src="https://source.unsplash.com/random/500x500" alt="random"  width="500" height="500" />
						</div>
					</div>
				</div>
			</div>
			<div class="point asPointGCEO">
				<div class="uk-container">	
					<div class="uk-grid">
						<div class="uk-width-2-3@m">
							<article>
								<div class="asElement asElement02 asWhite asElementWhite"></div>
									<h1 class="asWhite">Section 3</h1>
									<h3 class="asWhite">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec scelerisque massa ullamcorper ante mattis tempus. Nullam vulputate maximus massa, ut malesuada nibh</h3>
									<h4 class="asYellow asFontBold uk-margin-remove-bottom">Donec scelerisque massa</h4>
									<p class="asWhite uk-margin-remove">Donec scelerisque massa</p>
									<a href="#"><div class="asButton uk-margin-medium-top uk-margin-large-bottom">download</div></a> 
							  </article>
						 </div>
						<div class="uk-width-1-3@m asLeaderImage asLeaderImage2">
							 <img src="https://source.unsplash.com/random/500x500" alt="random"  width="500" height="500" />
						</div>
					</div>	  
				</div>
			</div>
		</div>  
	</section>

</div>
	<section id="Section04" class="GroupFinancial vh">
    <h1>Section 4</h1>
  </section>

              
            
!

CSS

              
                html,
body {
    margin:0;
	padding:0;
	position: relative;
	font-size:14px;
	overflow-x: hidden;
}

a, button {
	transition: .5s ease-in-out;
	font-size:1.125rem;
	
}


.asNaviBar {
    position: fixed;
    z-index: 888;
    width: 100%;
    margin-top: 15px;
	background-color: rgb(0, 0, 0, 0.0) !important;
	margin-right:60px;
}

.asNaviBar ul{
	list-style-type: none;
	margin:0 60px 0 0;
}

.asNaviBar ul li.menu2{
	color:#6d6e71;
}
.asNaviBar ul li{
	transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
	color:#fff;
}
li.menu2{
	color:#6d6e71;
}
.asNaviBar ul li.asMenuClose2{
	color:#fff;
}
.asNaviBar ul li:nth-child(1), .asNaviBar ul li:nth-child(2){
	margin-right: 15px;
}
.asMenuOpen{
	display:none!important;
}

.asMenuClose{
	display: none;
	color:#fff;
}

.asMenuClose2{
	display: inline-block!important;
	color:#ffffff;
}

.asHamburger .asHamburger-btn {
    overflow: hidden;
    width: 35px;
    height: 44px;
    cursor: pointer;
    /*position: absolute;
    z-index: 1;
    appearance: none;
    transform: translateY(-50%);*/
}
.asHamburger .bar {
	height: 3px;
	background-color: #fff;
	transition: background-color 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
	display: block;
	top: 20px;
	margin-top: 8px;
}

.asHamburger .bar2{
	background-color: #6d6e71;
}
.asHamburger .bar:first-child {
  top: 10px;
}
.asHamburger .bar:last-child {
  top: 30px;
}
.asHamburger .btn-close .bar {
  background-color: #fff;
  transform: translateX(120%);
  opacity: 0;
}
.asHamburger .btn-close .bar:first-child, .asHamburger .btn-close .bar:last-child {
  transform: translateX(0);
  opacity: 1;
}
.asHamburger .btn-close .bar:first-child {
  transform: translateY(10px) rotate(45deg);
}
.asHamburger .btn-close .bar:last-child {
  transform: translateY(-12px) rotate(-45deg);
}

.overlay {
	display:none;
	position:fixed;
	top:0;
	height:100%;
	width:100%;
	background:#f173ad;
	overflow:auto;
	z-index:99;
}
.wrap {
	color:#e9e9e9;
	position: absolute;
    top: 50%;
    left: 50%;
    margin-right: -50%;
    transform: translate(-50%, -50%) 
}
.wrap ul.wrap-nav {
	padding: 170px 0px 0 0;
}
.wrap ul.wrap-nav li {
	position:relative;
	list-style-type: none;
	font-size:2.3rem;
	text-align:center;
}
.wrap ul.wrap-nav li a {
	color:#fff;
	display:block;
	padding:11px 0;
	text-decoration:none;
	transition-property:all .2s linear 0s;
	-moz-transition:all .2s linear 0s;
	-webkit-transition:all .2s linear 0s;
	-o-transition:all .2s linear 0s;
	font-family: 'Gotham-Bold';
	font-size:2.86rem;
}

.wrap ul.wrap-nav li a:hover {
	color: #050720;
}


.MessageFromOurLeader .point {
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
}

.MessageFromOurLeader {
	position: relative;
	background-color: #1e4798;
}

.MessageFromOurLeader,
.MessageFromOurLeader .wrapper {
	height: 100vh;
	width: 100%;
	overflow: hidden;
	position: relative;
}

/*point article {
  flex-basis: 60%;
}
*/
.point img {
  height: auto;
}
.asLeaderImage img{
	width:80%;
}

.asLeaderImage{
	align-items: flex-end;
	display: flex;
	position: absolute;
	right: 80px;
	bottom:0;

}
.asLeaderImage2{
	position: absolute;
	right: 80px;
	bottom:0;
}

.asPointGCEO{
	background-color:#ec008c;
}

.asMessageLeader-bg{
	position:absolute;
	right:0;
	bottom:0;
}

.asChairmanFigure{
	padding:15px;
}

.vh {
	height: 100vh;
  background-color:purple;
}

              
            
!

JS

              
                $(document).ready(function(){
    $(".asHamburger a").click(function(){
    $(".overlay").fadeToggle(200);
    $(this).toggleClass('btn-open').toggleClass('btn-close');
    $(".asNaviBar ul li:nth-of-type(2)").toggleClass('asMenuClose').toggleClass('asMenuClose2');
    $(".asNaviBar ul li:nth-of-type(1)").toggleClass('asMenuOpen');
		
    });
});

$('.overlay').on('click', function(){
    $(".overlay").fadeToggle(200);   
    $(".asHamburger a").toggleClass('btn-open').toggleClass('btn-close'); 
	
    open = false;
});	


gsap.registerPlugin(ScrollTrigger);

// record the initial inline styles so they can be reverted when the matchMedia doesn't match anymore. 
ScrollTrigger.saveStyles("article, img, .indicator, .point");

ScrollTrigger.matchMedia({

  // desktop
  "(min-width: 768px)": function() {
	  var points = gsap.utils.toArray('.point');
    var indicators = gsap.utils.toArray('.indicator');

    var height = 100 * points.length;

   var tl = gsap.timeline({
  duration: points.length,
  scrollTrigger: {
    trigger: ".MessageFromOurLeader",
    
    //start: "top center",
    //end: "+="+height+"%",
    
    start: "top bottom", 
    end: "+="+height+"%",
    
    scrub: true,
    id: "points",
  }
})

var pinner = gsap.timeline({
  scrollTrigger: {
    trigger: ".MessageFromOurLeader .wrapper",
    start: "center center",  // <-------
    
    //end: "+="+height+"%",
   end: "+=100%",
    
    scrub: true,
    pin: ".asContent",  // <-------
    //pinSpacing: true,
    id: "pinning",
    //markers: true
  }
})


    points.forEach(function(elem, i) {
      tl.set(elem, {position: "absolute", top: 0}, 0);

      tl.to(indicators[i], {backgroundColor: "orange", duration: 0.25}, i)
      tl.from(elem.querySelector('img'), {autoAlpha:0}, i)
      tl.from(elem, {autoAlpha: 0}, i)
      tl.from(elem.querySelector('article'), {translateY: 100}, i)

      if (i != points.length-1) {
        tl.to(indicators[i], {backgroundColor: "#adadad", duration: 0.25}, i+0.75)
        tl.to(elem, {autoAlpha: 0}, i + 0.75)
        tl.to(elem.querySelector('article'), {translateY: -100}, i + 0.75)
        tl.to(elem.querySelector('img'), {autoAlpha:0}, i + 0.75)
      }

    });	
  }
	
}); 	
              
            
!
999px

Console