wagerfield / parallax

Parallax Engine that reacts to the orientation of a smart device
http://wagerfield.github.io/parallax/
Other
16.47k stars 2.14k forks source link

Using parallax with custom transform styles #289

Closed lukisrac closed 6 months ago

lukisrac commented 4 years ago

Hi,

is there any way to use custom CSS transform properties with parallax library?

I need to use transform: rotate() property on each element in scene, but after parallax init, it removes my transform: rotate() from all layers.

I appreciate any help, and sorry for my bad English :( Thank you!

stian-scholtz commented 4 years ago

Hi. I too have elements with transformation that do not persist. As soon as the Parallax instance instantiates, the transformations applied via css are removed. Anyway we can take into account the existing styles?

durchanek commented 4 years ago

An easy workaround is to add an extra HTML element and apply your custom styles on it.

artstylee commented 3 years ago

you should wrap the images with position and transform inside the div wrapper with 100% width then it will work ok