Published:
13 Jun 2025
Updated:
09 Jul 2026

CSS Page Preloader in Breakdance Builder

Step 1: Create the Loader Elements

In Breakdance, add two Div elements and assign them the following classes:

  • afterloader
  • afterloader2

Step 2: Configure the Div Settings

Go to Advanced > Wrapper > Layout:

  • Z-Index: 999999
  • Position: Fixed
  • Left: 0
  • Top: 0

Step 3: Add Custom CSS

Paste the following CSS into your site (e.g., via Breakdance > Settings > Custom Code > CSS, or in your theme customizer):

.afterloader2 {
width: 100%;
height: 100vh;
background-color: #DBFF00;
animation: slideDown 1.5s cubic-bezier(.98,-0.01,0,1.03) forwards;
transform-origin: top;
}

@keyframes slideDown {
0% {
transform: scaleY(1);
opacity: 1;
}
99% {
opacity: 1;
}
100% {
transform: scaleY(0);
opacity: 0; /* Fades out the div */
}
}

.afterloader {
    width: 100%;
    height: 100vh;
    background-color: #151A1B;
    animation: slideDown 1.5s cubic-bezier(.98,-0.01,0,1.03) forwards;
  animation-delay: 0.2s;
}

@keyframes slideDown {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100vh);
}
}

.hide {
display: none; /* Utility class for hiding elements */
}

Step 4: Add Global JavaScript

Go to Breakdance > Settings > Custom Code > JavaScript (or use a plugin like Code Snippets), and insert this JavaScript:

// Select both loader elements
const afterLoaders = document.querySelectorAll('.afterloader2, .afterloader');
// Add animationend listener to each loader
afterLoaders.forEach(function(afterLoader) {
afterLoader.addEventListener('animationend', function() {
this.style.display = 'none'; // Hides the loader after animation ends
});
});
Matus Trgina
- Founder of Shapeusto

Last posts

Quick Tips

Pause or cancel anytime

If you don't need our services, there's no reason to pay. Just pause your subscription.

48 hour average delivery

We work incredibly fast. We can create most tasks within 48 hours.

Unlimited users

An unlimited number of team members can add tasks to us.

Unlimited requests

Simply enter the number of tasks you need to solve, and we'll take care of all of them.
© 2026 Shapeusto. All rights reserved