Effects & DesignElementor

How To Make Zoom In video/image 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
Kitpapa Ready made Elementor template kits.
Get Templates
Kitninja eCommerce Elementor template kits.
Get Templates

Prompt Used in This Tutorial

Video Zoom In Style CSS
<style>

.video-scroll {
  position: sticky;
  top: 20px;
  left: 20px;
  height: 250px!important;
  width: 320px!important;
  transition: none;
  z-index: 10!important;
  transform-origin: top left;
}

.video-scroll .elementor-video{
    border-radius: 100px;
}


.tablet-video{
   
    width: 100%!important;
    height: 400px!important;
    border-radius: 100px;
   
    }


@media (max-width: 767px){
    .tablet-video{
   
    width: 100%!important;
    height: 160px!important;
    border-radius: 15px;
   
    }
}

</style>
Video Zoom In Style CSS Classes
video-scroll
tablet-video
Video Zoom In Effect JS Code
<script>


const video = document.querySelector('.video-scroll');

const startWidthPx = 320; 
const startHeightPx = 250; 
const targetWidthPx = 1024;
const targetHeightPx = 600; 
const maxScroll = 400; 

window.addEventListener('scroll', () => {
  const scrollY = window.scrollY;
  
  if (scrollY <= 0) {
   
    video.style.setProperty("width", `${startWidthPx}px`, "important");
    video.style.setProperty("height", `${startHeightPx}px`, "important");
  } else {
    const clampedScroll = Math.min(Math.max(scrollY, 0), maxScroll);
    const progress = clampedScroll / maxScroll;  
    const currentWidthPx = startWidthPx + (targetWidthPx - startWidthPx) * progress;
    const currentHeightPx = startHeightPx + (targetHeightPx - startHeightPx) * progress;

    video.style.setProperty("width", `${currentWidthPx}px`, "important");
    video.style.setProperty("height", `${currentHeightPx}px`, "important");
  }
});

</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