html - 移动网页..隐藏在智能手机控件后面的部分页面

标签 html css mobile

我有一个网页,它像一个应用程序一样工作.. 一切正常,但页面的某些部分隐藏在智能手机控件后面(我猜只有安卓设备) 在 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/

相关文章:

javascript - 嵌入了动态驱动器选项卡的谷歌地图(不是 jquery-ui 选项卡)

html - 如何在纯 CSS 中创建视差效果?

javascript - domToImage 代码仅在 iOS 浏览器上抛出安全错误(Dom 异常 18)

javascript - 如何切换多个字体图标

javascript - 如何从 HTML 调用和形成 React.js 函数

html - Bootstrap 4,如何使用 "no scroll"在 SPA 上获得响应高度?

javascript - 使用 Javascript 样式化元素而不被注意到

mobile - 在 AppCenter 中构建使用 Carthage 的应用程序

iphone - 模拟移动测试连接问题的最佳软件产品

javascript - 如何检查 php 中的空序列化字符串?