samedi 11 juin 2016

Is there a `background-attachment`-like CSS property that sets a DIV's content to be positioned relatively to the viewport?


I would like the content of a piece of HTML to not scroll like normally, but the actual container to still keep scrolling. Using position:fixed doesn't solve this since it disables scrolling altogether. Any ideas?


Edit: Here is Codepen that tries to explain what I want to do, I Need the text inside the image containers to behave just like the fixed image background, or stay static with the image (by static I mean not scroll) in both containers, but also HIDE when scrolling hides the container, just like the fixed image does: http://codepen.io/sgarcia-dev/pen/RRrqZz


Aucun commentaire:

Enregistrer un commentaire