I’d like to display a fixed div based on if another element is scrolled into view. Just to state that another way, the fixed di should not be seen until a particular element that is some unknown distance down the page is scrolled into the viewable area of the user’s window.
So you work with z-index to hide the fixed element behind scrolling elements.
If you want to get different behavior then JavaScript is the only way. CSS provides no mechanism to know scrolling position or if element is viewable on the screen/viewport.
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘CSS’ is closed to new topics and replies.