I'm trying to implement a linear-gradient
on the html tag so that when the user overscrolls it will appear.
I can apply css background-color
to the html
element to allow the colors to appear like they extend above and below our page to make overscrolling less jarring or 'native.' This is sometimes referred to as 'rubber banding.'
A great example of what I mean can be found on Peter Ramsing's site. His example is below:
However, background-color
seems to be the only property that works like this. Here is an example of the difference in behaviour between background-color
and background-image
(linear-gradient) - apologies for the gif quality:
You can find the markup to replicate the issue on codepen - this cannot be replicated within codepen itself unless on debug mode so I suggest forking this link to test.
It would be nice to have the option to have any background property extend and take rubber banding into account. I don't think there's a work around for this so I'm looking to see if anyone would know as to why Chrome team have not included this as a feature?
If no one knows as to why I'm going to submit a bug/feature request for this.