Motion Lab / Heroes / parallax layers / editorial
// Mechanisme: hero-parallax-layers-editorial
import gsap from 'https://esm.sh/gsap@3.12.5';
// Pas toe op je eigen selector — geen stijlkeuzes hier.
import gsap from 'https://esm.sh/gsap@3.12.5';
import{ScrollTrigger}from 'https://esm.sh/gsap@3.12.5/ScrollTrigger';
gsap.registerPlugin(ScrollTrigger);
if(window.matchMedia('(prefers-reduced-motion: reduce)').matches)return;
gsap.to('.parallax-bg',{yPercent:-20,ease:'none',scrollTrigger:{trigger:'.parallax-section',start:'top bottom',end:'bottom top',scrub:0.5}});
gsap.to('.parallax-fg',{yPercent:-8,ease:'none',scrollTrigger:{trigger:'.parallax-section',start:'top bottom',end:'bottom top',scrub:1}}); <!-- Skeleton: hero-parallax-layers-editorial --> <div class="demo-block"> <!-- DOM-structuur hier --> </div>
/* Styling: hero-parallax-layers-editorial */
:root {
--block-bg: ;
--block-fg: ;
--block-accent: ;
}