Mobile-Chrome-App not able to scroll

痴心易碎 提交于 2019-12-08 05:11:12

问题


I also have this issue. I am using Ubuntu and just completed the Hello world tutorial. I wrote some more text and I am unable to scroll. I can see where the words keep going but nothing I have tried lets it scroll. I have not made any HTML/CSS edits. I have only added more text to the <p> tag.


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/21641641/mobile-chrome-app-not-able-to-scroll

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