0

Scroll Shadow at the top of the page

I'm having trouble getting rid of this shadow when I scroll too far up/down. I'm currently using Cordova to display my HTML, but I see this behavior on other sites in the Chrome browser, so I feel like this may be a property in the HTML. Is there a way to get rid of it using CSS?

  • I don't think it's possible to get rid of it. It's a native part of Android that lets the user know they can't scroll any further. For this reason I wouldn't recommend even trying to get rid of it. It's possible you might be able to cook up a JavaScript solution that keeps checking the scroll position and ensuring it never hits the very top or bottom, but that could get ugly. – spacer GIF Jan 01 '19 at 17:52
  • Ah. That's unfortunate. I'm making an app with Cordova right now, and the shadow makes the app look completely un-native. I ended up finding a solution specifically for Cordova/phone-gap apps, but the shadow still looks a little obnoxious if I load the HTML page in the phone's browser. – cyropox Jan 01 '19 at 18:02

1 Answers1

0

I found a solution to this issue specifically for Cordova/Phone-gap users here. In your config.xml file, you can add the line

<preference name="DisallowOverscroll" value="true" />

I'll keep searching for a solution that works in Android web browsers.