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

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

              
                <article id="index">
	<h1>Hello There</h1>
	<h2>Whatever you are be a good one :)</h2>

  
<!-- TABLE OF CONTENTS -->
<section>

  
<div class="static"><p>Suspendisse suscipit quam at ante aliquet pellentesque. Morbi magna diam, auctor sit amet laoreet quis, varius at dui. Phasellus eros tellus, tristique in tortor a, tempor tristique felis. Pellentesque vel efficitur lectus. Ut eleifend mauris odio, sit amet molestie orci mattis vel. Curabitur interdum quis mi non pretium. Suspendisse eu lorem rutrum, laoreet arcu eget, finibus sapien. Sed molestie, metus ut semper consectetur, lorem enim sagittis ligula, at fringilla augue erat et velit. Nunc egestas vulputate aliquet. Phasellus at volutpat lorem. Nulla nisl nunc, viverra hendrerit nulla a, placerat blandit nibh.</p>
  <p>Ut eleifend mauris odio, sit amet molestie orci mattis vel. Curabitur interdum quis mi non pretium. Suspendisse eu lorem rutrum, laoreet arcu eget, finibus sapien. Sed molestie, metus ut semper consectetur, lorem enim sagittis ligula, at fringilla augue erat et velit. Nunc egestas vulputate aliquet. Phasellus at volutpat lorem. Nulla nisl nunc, viverra hendrerit nulla a, placerat blandit nibh.</p>
  
    <p>Ut eleifend mauris odio, sit amet molestie orci mattis vel. Curabitur interdum quis mi non pretium. Suspendisse eu lorem rutrum, laoreet arcu eget, finibus sapien. Sed molestie, metus ut semper consectetur, lorem enim sagittis ligula, at fringilla augue erat et velit. Nunc egestas vulputate aliquet. Phasellus at volutpat lorem. Nulla nisl nunc, viverra hendrerit nulla a, placerat blandit nibh.</p>
</div>
  
  <h2>If I change the size of the browser window - this separator "jumps": </h2>
  <div class="dcm"> 
	
	<div class="dcm1"></div>
	<div class="dcm2"></div>
	<div class="dcm3"></div>
	<div class="dcm4"></div>
	<div class="dcm5"></div>
	<div class="dcm6"></div>	
	
</div>
  
</section>



<section>
<div class="static"><p>Suspendisse suscipit quam at ante aliquet pellentesque. Morbi magna diam, auctor sit amet laoreet quis, varius at dui. Phasellus eros tellus, tristique in tortor a, tempor tristique felis. Pellentesque vel efficitur lectus. Ut eleifend mauris odio, sit amet molestie orci mattis vel. Curabitur interdum quis mi non pretium. Suspendisse eu lorem rutrum, laoreet arcu eget, finibus sapien. Sed molestie, metus ut semper consectetur, lorem enim sagittis ligula, at fringilla augue erat et velit. Nunc egestas vulputate aliquet. Phasellus at volutpat lorem. Nulla nisl nunc, viverra hendrerit nulla a, placerat blandit nibh.</p>
    
<p> Suspendisse suscipit quam at ante aliquet pellentesque. Morbi magna diam, auctor sit amet laoreet quis, varius at dui. Phasellus eros tellus, tristique in tortor a, tempor tristique felis. Pellentesque vel efficitur lectus. Ut eleifend mauris odio, sit amet molestie orci mattis vel. Curabitur interdum quis mi non pretium. Suspendisse eu lorem rutrum, laoreet arcu eget, finibus sapien. Sed molestie, metus ut semper consectetur, lorem enim sagittis ligula, at fringilla augue erat et velit. Nunc egestas vulputate aliquet. Phasellus at volutpat lorem. Nulla nisl nunc, viverra hendrerit nulla a, placerat blandit nibh.</p>
  
<p> Suspendisse suscipit quam at ante aliquet pellentesque. Morbi magna diam, auctor sit amet laoreet quis, varius at dui. Phasellus eros tellus, tristique in tortor a, tempor tristique felis. Sed molestie, metus ut semper consectetur, lorem enim sagittis ligula, at fringilla augue erat et velit. Nunc egestas vulputate aliquet. Phasellus at volutpat lorem. Nulla nisl nunc, viverra hendrerit nulla a, placerat blandit nibh.</p>
  
</div>

</section>  
  


  
<!-- FOOTER -->  
<div class="gototop"><a href="#index">Go to top</a></div>

</article>
              
            
!

CSS

              
                article {margin: 80px}

  section {
    width: 100%;
    margin-bottom: 24px;
    margin-top:16px;
  }

  h1 {
    font-size: 80px;
    text-align: center;
    font-family: sans-serif;
    font-weight: 800;
    color: #9c9c9c;
    margin: 0;
  }

  h2 {
    font-size: 40px;
    text-align: center;
    font-family: sans-serif;
    font-weight: 800;
    color: blue;
    margin-top: 24px;
  }

   .block {
    display: block;
    height: 20vh;
    background: blue;
  }



  .static {
    display: block;
    background: #1a1a1a;
    color: white;
    padding: 24px;
    margin: 24px 0;
  }

  p {
    max-width: 60%;
    padding-top: 30px;
    padding-left:100px;
    font-size: 21px;
    line-height: 32px;
  }

  .gototop {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: red;
    color: white;
    text-align: center;
    font-size: 32px;
    padding: 8px;
  }

  .gototop a {
    color: white;
  }



/* 5-el Divider */
.dcm{
display:grid;
overflow: visible;
grid-template-columns:repeat(5, 1fr);
grid-template-rows:auto;
column-gap:8px;
width:100%;
grid-column:1 / span 10;
grid-row:auto;
background-color:white}



.dcm1{
grid-column:1 / 2;
margin-right:-8px;
background-color:black;
height:10vh;}

.dcm2{
grid-column:2 / 3;
margin-right:-8px;
background-color:orange;
height:15vh;}

.dcm4{
grid-column:3 / 4;
grid-row:1;
margin-right:-8px;
background-color:black;
height:30vh;}

.dcm5{
grid-column:4 / 5;
grid-row:1;
margin-right:-8px;
background-color:yellow;
height:15vh;}


.dcm6{
grid-column:5 / 6;
grid-row:1;
background-color:green;
height:10vh}



              
            
!

JS

              
                let divMain = gsap.timeline({
	onComplete: () => ScrollTrigger.refresh(),
	defaults: {duration: 1.5, ease: "power4"},
	scrollTrigger: {
	trigger: ".dcm",
	start: 'top 60%',
	toggleActions: "play none none reverse", 
	}
	});


divMain
.from(".dcm1", {height:"100vh"})
.from(".dcm2", {height:"90vh"}, "-=1.5")
.from(".dcm3", {height:"100vh", duration:2}, "-=1.5")
.from(".dcm4", {height:"90vh"}, "-=2")
.from(".dcm5", {height:"120vh", duration:1}, "-=2")
.from(".dcm6", {height:"100vh"}, "-=2")
              
            
!
999px

Console