Copy link to clipboard
Copied
Hi, I want to apply parallax scrolling in adobe muse fluid width. I use this code-
<script type="text/javascript">
var ypos,image;
function parallex() {
image = document.getElementById('u115');
ypos = window.pageYOffset;
image.style.top = ypos * .7+ 'px';
}
window.addEventListener('scroll', parallex),false;
</script>
Here is the link-Home
It works when I used hero image and "image.style.top = ypos * .7+ 'px'". But its not work in center position image. I tried to use image.style.fixed/relative/center/absolute. Only work in image.style.top. If I use it center position image by image.style.top, image jump in top when I scroll. How do I fix it? Any solution for middle or center image?
Thank you
then I suggest top, left of the browser 1 pixel down and in as the only option
Copy link to clipboard
Copied
khairultohin1 wrote:
How do I fix it?
you don't! thats why parallax scrolling only works in fixed breakpoints
Copy link to clipboard
Copied
Fix it means, I mean how could I solve this problem? Please see my link, you will understand what I want to be say. I need this parallax effect in any photo of this project.
Copy link to clipboard
Copied
then I suggest top, left of the browser 1 pixel down and in as the only option