I am looking for a way to animate (with @keyframes
, transform
...) some elements when the user scrolls the page. For example:
- When offset is 0:
div
hasheight: 100px
. - When offset is between 0 and 100:
div
isheight: 50px
andcolor: blue
. - And so on...
Is is possible using pure CSS? If it is not, what are the most efficient ways to do it with HTML or Javascript?