At least when you scroll over the edge on mac, you see the page moving down and leaving a plain color behind it. Iv'e figured out the you can change the color by setting the background color of the body
. But is there any other approach to it? Because sometimes I need a different colors at top and bottom, etc.
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
- Issue with star rating css
I need to achieve something similar.
The solution posted by @tksb doesn't work for me on Chrome (OS X), seems like Chrome uses the
background-color
to define the rubber band background, and ignores thebackground-image
.The solution I've found is to use a bit of JS
Here a full screen demo to test it: http://s.codepen.io/FezVrasta/debug/XXxbMa
My solution has been to cheat a little bit and use a
linear-gradient()
on thehtml
orbody
tag to control the segmented background colors for a given project.Something like this should split the background in half and take care of modern browsers.
I've had mixed luck getting the same behavior on iOS, and seems to be more dependent on the specific layout.