我有一个网页,它像一个应用程序一样工作.. 一切正常,但页面的某些部分隐藏在智能手机控件后面(我猜只有安卓设备) 在 css 中定义
html, body{
width:100%;
height:100%;
margin:0px;
position:fixed;
overflow:scroll;
}
在元的 html 中我们有
<meta name='viewport' http-equiv="Content-Type" content="user-scalable=0; text/html; charset=utf-8"/>
问题是因为一些组件是固定的,而 body 的一部分在这些组件上滚动......比我需要的 body 具有视口(viewport)的确切大小
有人可以帮忙吗?
最佳答案
你试过 initial-scale=1
了吗? ?在你的<meta>
标签?
<meta name="viewport" content="width=device-width, initial-scale=1.0">
因为这个w3schools page说:
A
<meta>
viewport element gives the browser instructions on how to control the page's dimensions and scaling.The
width=device-width
part sets the width of the page to follow the screen-width of the device (which will vary depending on the device).The
initial-scale=1.0
part sets the initial zoom level when the page is first loaded by the browser.
关于html - 移动网页..隐藏在智能手机控件后面的部分页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42819579/