简体   繁体   English

如何使Chrome Packaged Apps中的窗口(网络视图)滚动显示内容超过可用高度的页面?

[英]How to make the window (webview) in Chrome Packaged Apps scroll for pages with content more than available height?

I created a test application using Yeoman/Angular.js and pasted a chunk load of HTML (responsive) to view it as a Chrome Packaged App (CPA). 我使用Yeoman / Angular.js创建了一个测试应用程序,并粘贴了一大段HTML(响应式),以将其视为Chrome打包的应用程序(CPA)。 The page_height with all its content is more than the height of packaged application in full_screen mode. 其全部内容的page_height大于全屏模式下打包的应用程序的高度。

There seems no way to scroll down the view (touch/mouse-drag) to see the content below. 似乎无法向下滚动视图(触摸/鼠标拖动)以查看下面的内容。 How do I add/enable scroll bar on a page? 如何在页面上添加/启用滚动条? Shouldn't this be by default? 这不是默认设置吗?

Had the same problem. 有同样的问题。 On your css file, add: 在您的css文件中,添加:

html {
    overflow-y: scroll;
}

Another more smoothly solution is below: 另一个更平稳的解决方案如下:

body {
    margin:0;
    padding:0;
    overflow-y: hidden;
}
body:hover {
    overflow-y: scroll;
}

Jsfiddle 的jsfiddle

Reference 参考

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM