react-id-swiper icon indicating copy to clipboard operation
react-id-swiper copied to clipboard

Parallax different background per slide

Open hellofantastic opened this issue 5 years ago • 1 comments

I've hit a wall with trying to get parallax working with different background images per slide Like this vanilla swiperjs example http://sttheme.com/demosd/uoncorp/

My attempt was only set parallax: true on params skip parallaxEl then something to this effect

<Swiper {...params}>
   <div>
      <h1 data-swipe-parallax={-200} >Heading</h1>
       <p data-swipe-parallax={-300} > ...etc</p>
       <div data-swipe-parallax={-100}><img src={headerImage}/></div>
        OR <div data-swipe-parallax={-100} style={{ backgroundImage: `url(${headerImage})`}></div>
   </div>
</div>

So I am asking if its possible even in this react implementation of swiperjs

hellofantastic avatar Feb 16 '20 04:02 hellofantastic

okay... figured it out .. css I'll put together a CodeSandbox...

here we go https://codesandbox.io/s/empty-feather-sqgrj

hellofantastic avatar Feb 16 '20 06:02 hellofantastic