Skip to content

Element with parallax applied always transformed along Y axis when scroll position is 0  #21

Closed
@hamishtaplin

Description

@hamishtaplin

Sorry for the long-winded title. I'm using this library (awesome work btw) to implement a parallax header similar to your example: https://codepen.io/jscottsmith/pen/aVBvGj

My issue is that I want the header to not be transformed at all until the user scrolls, so it sits flush to the top of the viewport. However, even when window.scrollY is 0 there's always some transformY being applied. You can see this even in the codepen above so I'm sure it's not something I'm doing wrong.

Is this by design?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions