如何在移动内容中制作全屏页面?

时间:2017-02-15 08:56:02

标签: android mobile fullscreen

我需要的是

-disabled zoom function

-fullscreen页面(在网络浏览器和移动视图中)

-disabled scrolling page

到目前为止我做了什么..

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=yes">
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0">
</body>

我无法弄明白如何在移动视图中全屏显示页面。

当我在手机上运行时,它只显示了一半的页面。而将其他空间留空。

请帮我解决一下。

非常感谢。

1 个答案:

答案 0 :(得分:1)

全屏&amp; zoom:

- (void)startStandardUpdates
{
    // Create the location manager if this object does not
    // already have one.
    if (nil == locationManager)
        locationManager = [[CLLocationManager alloc] init];

    locationManager.delegate = self;
    locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;

    // Set a movement threshold for new events.
    locationManager.distanceFilter = 500; // meters

    [locationManager startUpdatingLocation];
}

并禁用滚动尝试在ur css中添加:

<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport' />

并尝试通过主css文件中的此属性删除body标签中的所有边距设置

html, body {
  overflow-x: hidden;
}