Not working with absolute positioned layers
Badro0 opened this issue · comments
I have absolute positioned layers, but the script sets the position to relative and top:0 and left:0 for all layers, i had to change updateLayers() function to remove this behavior. Does it support absolute positioned layers ?
Hi, did you manage to solve this? I having the same problem ! Thanks in advance !
Hi, did you manage to solve this? I having the same problem ! Thanks in advance !
Yes, i changed the updateLayers() function in parallax.js file, you can change it in src and then compile, or change it directly in the parallax.js file in dist directory..
I just commented these lines to make sure it doesn't set the left and top to 0:
// line 705
// layer.style.position = index ? 'absolute' : 'relative';
// line 707
// layer.style.left = 0;
// layer.style.top = 0;
Note,!important
tags work too. An option to disable this would be a nice feature.