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

              
                
<div id="smooth-wrapper">
  <div id="smooth-content">
    <div class="content">
      <button class="open">open modal</button>
    </div>
  </div>
</div>

<div class="modal">
  <button class="close">close modal</button>
  <h1>
    Bacon ipsum dolor amet porchetta cupim pastrami swine spare ribs, meatball ham doner biltong shank andouille. Bresaola cupim tail ball tip alcatra. T-bone burgdoggen rump, drumstick prosciutto tri-tip ground round spare ribs corned beef shank turducken buffalo turkey. Jerky pig venison, strip steak chicken prosciutto burgdoggen alcatra cow bresaola andouille boudin spare ribs brisket.

Landjaeger ham hock tail, prosciutto capicola alcatra porchetta jowl jerky beef doner kielbasa flank ham. Jerky pork chop ground round pig ham hock. Pig meatloaf tail sausage pork loin. Spare ribs pork loin kevin ham burgdoggen, meatloaf beef shoulder sausage salami sirloin alcatra prosciutto fatback pork chop.

Sirloin kevin pork belly meatloaf sausage prosciutto flank tongue short ribs venison. Chuck short ribs leberkas beef shoulder chislic. Ribeye shoulder bresaola pork brisket. Fatback short ribs ham hock, buffalo spare ribs brisket swine ham tongue chuck tail tri-tip short loin ball tip.

Pancetta kielbasa andouille fatback alcatra burgdoggen drumstick pastrami porchetta brisket. Beef jowl pancetta venison shank bresaola ham doner strip steak prosciutto spare ribs flank pork loin. Kevin short ribs beef ribs drumstick shankle. Kevin turducken shankle, jowl hamburger tail pork loin salami sirloin meatloaf chislic. T-bone jerky ball tip, beef ribs tenderloin doner meatball pork chop venison ham hock pancetta fatback porchetta ground round. Ham hock flank pork chop short loin, salami sirloin tri-tip shank pancetta pork rump pastrami. Meatball chuck pig turducken tenderloin, pork belly bresaola pastrami rump t-bone.

Pork belly ribeye tongue beef ribs kielbasa ham short ribs swine jowl corned beef tri-tip salami. Frankfurter brisket cupim, shankle meatball tri-tip beef ribs beef leberkas. Pig alcatra ham corned beef turducken. Flank ground round beef alcatra shank andouille pork sirloin chicken jowl. Pig biltong jowl meatball kevin brisket hamburger drumstick. Tongue boudin tail prosciutto filet mignon, tenderloin ham hock doner pork belly turkey bacon. Flank tenderloin ham hock salami pastrami.

Does your lorem ipsum text long for something a little meatier? Give our generator a try… it’s tasty!
  </h1>
</div>
              
            
!

CSS

              
                .content {
  padding: 400px 0;
}

.modal {
  display: none;
}
              
            
!

JS

              
                gsap.registerPlugin(ScrollTrigger, ScrollSmoother)

let smooth = ScrollSmoother.create({
  smooth: 1.4,
  normalizeScroll: true
});

let modal = document.querySelector('.modal');
let open = document.querySelector('.open');
let close = document.querySelector('.close');

open.addEventListener('click', e => {
  smooth.paused(true);
  open.style.display = 'none';
  gsap.set(modal, {
    display: 'block',
    position: 'fixed',
    top: 0,
    left: 0,
    width: '100%',
    height: '100vh',
    overflow: 'auto',
  });
});

close.addEventListener('click', e => {
  open.style.display = 'block';
  modal.removeAttribute('style');
  smooth.paused(false);
});
              
            
!
999px

Console