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

              
                <head>
    <title>CSS Scroll Effect</title>
  </head>
  <body>
    <section class="bg">
    <h2>Get All your news in one place</h2>
      <span class="skewed1"></span>
      <span class="skewed2"></span>
    </section>
    <section> 
      <h2>Lastest Articles</h2>
          <p>Git presenter heap sort blog Safari AWS. Containerized TOML Reddit duck typing node_modules gulp CLI const remote procedure call design. Looks good to me junior time-to-interactive state clean architecture shadow DOM. S3 Firefox module one-size-fits-all approach compression CS degree composition static elixir. Cloudfront progressive web app stand-up compile Dijkstra .NET var resolve.</p>
        <br><br><h2>Voice Your Opinions</h2>
  
      <p>MacBook rebase shareware functional programming parent programmer. Angular Slack production OOP minimum viable product imperative-mood. Perf matters microservices dynamic types i Ubuntu shadow DOM developer avocado devops neck beard compile.</p>
          
<br><br><h2>Popular Articles</h2> 
  <p>Static pair programming npm architecture Edge AWS. AWS Backbone.js class git legacy security test double brownfield UX tabs vs spaces. Middleware lazy load parent remote CSS-in-JS site reliability engineer. composition emoji serverless object library Safari domain free as in beer dynamic types casting.</p>
    </section>   
    
    <script>
      const skewed1 = document.querySelector('.skewed1');
      const skewed2 = document.querySelector('.skewed2');
      window.addEventListener('scroll',function(){
        const value1 = -15 + window.scrollY/45;
        const value2 = 15 + window.scrollY/-45;
        skewed1.style.transform = "skewY(" + value1 + "deg)";
        skewed2.style.transform = "skewY(" + value2 + "deg)";
      })
    </script>
 </body>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #323232;
}

.bg {
  position: relative;
  width: 100%;
  height: 100vh;
  background: #17c3b2;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.bg h2 {
  position: relative;
  color: #fff;
  font-size: 5em;
}

.skewed1 {
  position: absolute;
  bottom: -100%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: #323232;
  transform: skewY(-15deg);
  transform-origin: top left;
}

.skewed2 {
  position: absolute;
  bottom: -100%;
  right: 50%;
  width: 100%;
  height: 100%;
  background: #323232;
  transform: skewY(15deg);
  transform-origin: top right;
}

section {
  padding: 100px;
}

section h2 {
  color: #fff;
  font-size: 2em;
  margin-bottom: 10px;
}

section p {
  color: #fff;
  font-size: 1.2em;
}
              
            
!

JS

              
                
              
            
!
999px

Console