vguillou / parallax-element

A Polymer element allowing to declaratively create simple vertical or horizontal parallax scrolling effects, working on desktop and mobile. It features built-in deactivation of the effect in browsers (IE) that do not fully support the CSS transformations leveraged to achieve the parallax scrolling.
MIT License
25 stars 2 forks source link

2 consecutive parallax layers #6

Open NicolasRannou opened 8 years ago

NicolasRannou commented 8 years ago

Hi,

I am trying to add 2 consective parallax layers but it seems to break things. No error in the console.

Is it possible to do it? If not which would be the best alternative?

vguillou commented 8 years ago

It is possible, but it requires some tweaking (at least set a proper z-index to actually display the parallax-layers in the correct stacking order), and the effect is not always great.

Can you tell me more about what you are trying to achieve, maybe share some code?

NicolasRannou commented 8 years ago

Sure - basically I am trying to use it along the polymer starter kit (PSK) - with as few modifications as possible on the PSK - I got a basic demo working - I'll push it today and send you the link!

Thanks

vguillou commented 8 years ago

This #1 issue was actually related to PSK, and I explained there how to properly integrate parallax-element. You can find a working (although a bit dated) implementation here : https://github.com/vguillou/vguillou.github.io/tree/master/examples/PSK_with_parallax_layers

I probably will add a link to this on the main Readme very soon.