Upcoming

How To Make Stacking Sections On Scroll Using Elementor Free

Tools and Links Used

Hostinger Fast, beginner friendly WordPress hosting.
Get Hosting
Elementor The free page builder this tutorial is built with.
Get Elementor
Elementor Pro The Pro upgrade used throughout this tutorial.
Get Elementor Pro
Project Files Download the resources used in this tutorial.
Download Files
Kitpapa Ready made Elementor template kits.
Get Templates
Kitninja eCommerce Elementor template kits.
Get Templates

Prompt Used in This Tutorial

Stacking Sections On Scroll Style CSS
<style>
.sticky {
  position: sticky;
  top: 60px;
  will-change: filter, transform;
  transition: transform 0.3s cubic-bezier(.25,.8,.25,1), filter 0.3s cubic-bezier(.25,.8,.25,1);
  filter: blur(5px);
  transform: scale3d(1.1, 1.1, 1);
}

.sticky.in-focus {
  filter: blur(0px) !important;
  transform: scale3d(1.03115, 1.03115, 1) !important;
}
</style>
Stacking Sections On Scroll Style CSS Classes
sticky
in-focus
Stacking Sections On Scroll JS Code
<script>
const sections = document.querySelectorAll('.sticky');


function updateSectionsFocus() {
  const viewportHeight = window.innerHeight;
  const viewportCenter = viewportHeight / 2;
  
  sections.forEach(section => {
    const rect = section.getBoundingClientRect();
    const sectionCenter = rect.top + rect.height / 2;
    const distanceFromCenter = Math.abs(sectionCenter - viewportCenter);
    
  
    if (distanceFromCenter < viewportHeight * 0.3) {
      section.classList.add('in-focus');
    }

  });
}


function cleanupFocus() {
  const viewportHeight = window.innerHeight;
  const viewportCenter = viewportHeight / 2;
  
  sections.forEach(section => {
    const rect = section.getBoundingClientRect();
    const sectionCenter = rect.top + rect.height / 2;
    const distanceFromCenter = Math.abs(sectionCenter - viewportCenter);
    if (distanceFromCenter > viewportHeight * 0.6) {
      section.classList.remove('in-focus');
    }
  });
}


function update() {
  updateSectionsFocus();
  requestAnimationFrame(update);
}


requestAnimationFrame(update);

setInterval(cleanupFocus, 500);
</script>

Get Your FREE Freelancing Roadmap

Stop hopping between tutorials. Grab the Freelancing Mastery Handbook to learn how to choose a skill, build your foundation, find clients, and confidently start your freelancing journey.

Free eBook Download

Related Tutorials

From learning the right skills to building a stronger digital presence, we help you turn ideas into practical, professional results.

Vibe Code a REAL Animated WordPress Website with Claude + Elementor

21.8K views

View Tutorial

Vibe Coding Full Course for Beginners – Build & Launch a Real SaaS

3.3K views

View Tutorial

Edit Videos with ChatGPT Codex — Raw Clips to Finished Reel

3.4K views

View Tutorial

Browse All Tutorials