Mobile-Chrome-App not able to scroll

a 夏天 提交于 2019-12-08 19:48:30

There is some default CSS applied for chrome packaged apps. Putting the following in your CSS should re-enable scrolling:

html {
  overflow-y:scroll;
}

Someone is putting together a cool guide which might have some more tips. See https://gist.github.com/maicki/7622137#scrolling

Chrome apps have a default stylesheet applied to them, to help the web "page" be more of an "app" by default.

For Chrome Apps on Mobile, we also include this (well, a nearly identical) default stylesheet.

So that is the reason for that behavior. Scrolling is absolutely useful in very many contexts, and is absolutely supported in any DOM element by adding overflow-y: auto;.

It was simply deemed to be the wrong default for packaged apps which live inside a dedicated window of set bounds and where we encourage not having full page content overflow (very much the opposite of the web). Most apps usually surround a main scrolling element with fixed navigational elements (but not always).

FYI, there is also another open issue for Chrome Apps on Mobile to replicate yet more of the Chrome for Desktop default styles.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!