网页开始在移动设备上放大 [英] Webpage starts zoomed in on mobile devices

查看:102
本文介绍了网页开始在移动设备上放大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网页上使用此代码

 < meta name =viewportcontent =width = 1000 ,初始标度= 1.0,最大标度= 1.0> 

我认为最初的缩放比例会确保网页缩小,但不会。任何想法?



我试过这个:

 < meta name =viewportcontent =width = device-width,initial-scale = 1.0/> 

但是,我需要将宽度设置为1000px,否则它看起来不正确。 p>

答案:

 < meta name =viewportcontent = width = 1000; user-scalable = 0; /> 


解决方案

initial-scale = 1.0 告诉浏览器将缩放级别设置为正常(即不放大或缩小)。您只需要 width = 1000

 < meta name = viewportcontent =width = 1000> 


I'm using this code on my webpage

<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">

I would think the initial scale would make sure the webpage was zoomed out, but it doesn't. Any ideas?

I've tried this:

<meta name="viewport" content="width=device-width, initial-scale=1.0"/>

But, I need the width to be set to 1000px or it doesn't look correct.

Answer:

<meta name="viewport" content="width=1000; user-scalable=0;" />

解决方案

initial-scale=1.0 tells the browser to set the zoom level to normal (i.e. not zoomed in or out). You only need width=1000:

<meta name="viewport" content="width=1000">

这篇关于网页开始在移动设备上放大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆