How To Disable Scroll On Preloader Animation? [in 2023]

Written by: Mark Coleman
Published on:

Have you ever encountered a preloader animation that allows you to scroll while it’s still loading? It can be a frustrating experience that ruins the user’s experience.

Disabling scroll on preloader animation can be the solution to that problem.

In this blog post, we will discuss how to disable scroll on preloader animation in Webflow.

We will provide step-by-step instructions and different solutions, including using JavaScript and CSS.

We will also explain why and when you should disable scroll on preloader animation to improve the overall performance and user experience of your website.

So, let’s get started!

If you prefer to watch a video tutorial on how to Disable Scroll On Preloader Animation, check out this video tutorial:

How To Disable Scroll On Preloader Animation?

Here is how to disable scroll while preloader animation in Webflow:

  1. Open your Webflow project and go to the page where you want to disable scroll during preloader animation.
  2. Click on the plus sign to add a new element and select the “Div Block” element.
  3. Find the div element on your page where you want to wrap everything and disable scroll during preloader animation.
  4. Click on the div block and wrap everything in a div element with the class or ID of “.page-content-wrap”.
  5. Copy the class or ID name and paste it into the “Class or Tag” field in the settings panel of the div block you just created.
  6. Change the class or ID to an ID by clicking on the “Class” dropdown and selecting “ID”.
  7. In the settings panel of the div block, set the initial display to “none”.
  8. After the preloader animation is completed, change the display back to “block”.
  9. Save your changes and publish your site to see the scroll disabled during preloader animation.

That’s how you can disable scroll while preloader animation in Webflow. If you have any questions or comments, feel free to leave them below.

Can’t Disable Scroll On Preloader Animation – How to fix it?

Disabling scroll while preloader animation in Webflow can be tricky, but there are several solutions that you can try:

  • Wrap everything in a div: As shown in the tutorial, you can wrap all your animations in a div element and call it .page-content-wrap. Then, set the display to none until the animation is completed and back to display block. This will prevent scrolling during the animation.
  • Use JavaScript: You can use JavaScript to disable scrolling during the animation. Here’s an example code:

var body = document.body;
body.style.overflow = 'hidden'; // disable scrolling
// your animation code here
body.style.overflow = ''; // enable scrolling

  • Use CSS: You can also use CSS to disable scrolling during the animation. Here’s an example code:

html, body {
overflow: hidden; // disable scrolling
}
// your animation code here
html, body {
overflow: auto; // enable scrolling
}

Try these solutions and see which one works best for you. If you have any questions or comments, feel free to leave them below. Happy coding!

Why and When Should You Disable Scroll On Preloader Animation?

Disabling scroll on preloader animation can be useful for a few reasons:

  • It prevents users from scrolling while the animation is still loading, which can cause visual glitches or confusion.
  • It allows the animation to take center stage and create a more immersive experience for the user.
  • It can improve the overall performance of the animation by reducing the amount of resources needed to load other elements on the page.

When should you disable scroll on preloader animation? Generally, it’s a good idea to disable scroll whenever you have a preloader animation that takes more than a few seconds to load. This ensures that the user isn’t distracted or confused by other elements on the page while they wait for the animation to finish.

So how do you disable scroll on preloader animation in Webflow? According to the tutorial, you can do this by wrapping everything in a div called .page-content-wrap or .main and setting it to display none until the animation is completed. Then, you can set it back to display block. Here are the steps:

  1. Create a new div element by clicking the plus sign.
  2. Select a div block and wrap everything in it.
  3. Give the div block a class or ID, such as .page-content-wrap.
  4. Set the display property to none until the animation is completed.
  5. Set the display property back to block to show the content after the animation is finished.

By following these steps, you can create a seamless preloader animation that engages your users and improves their overall experience on your website.

Conclusion – Disable Scroll On Preloader Animation

Preloader animations can be a great addition to your website, but they can also be frustrating if users can scroll while the animation is still loading.

Disabling scroll on preloader animation can improve the overall performance and user experience of your website.

In this blog post, we provided step-by-step instructions on how to disable scroll on preloader animation in Webflow using CSS and JavaScript.

We also explained why and when you should disable scroll on preloader animation.

By wrapping everything in a div and setting it to display none until the animation is completed, you can create a seamless preloader animation that engages your users and improves their overall experience on your website.

Try these solutions and see which one works best for you.

Happy coding!

Mark Coleman - HowTOBuildWebsites
Written by Mark Coleman


Mark Coleman is the founder of HowToBuildWebsites.org, which provides comprehensive tutorials on website builders like WordPress, Wix, Squarespace, Webflow, and Shopify. He graduated from the University of North Texas with a business degree, developing an interest in web design's changing landscape and website builders' potential.

Mark enjoys experimenting with new web technologies, refining his web development skills, and actively participating in web design and development communities.

Learn more about him and read his articles here on HowToBuildWebsites.org.

Leave a Comment