meta name =" viewport"没有按预期工作 [英] meta name="viewport" doesn't work as expected
问题描述
我的网站上有这个元标记www.ssd-vergleichen.de
I have that meta tag in my website www.ssd-vergleichen.de
<meta name="viewport" content="width=device-width; initial-scale=1.0;"/>
防止设备初始缩放到网站。
当我在三星Galaxy S2上的Chrome移动浏览器上观看网站时,该网站的放大率约为400%。
我做错了什么?有人可以帮忙吗?
To prevent the device from initial zooming into the website. When watching the website on my chrome mobile browser on Samsung Galaxy S2, the website is beeing zoomed in about 400%. What did I do wrong? Can anyone help?
提前致谢
编辑:使用
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
它可以在Android的标准网络浏览器中使用,但仍然不在Chrome中。我想知道它是否适用于IOS?
it works in Android's standard webbrowser, but still not in Chrome. I wonder if it works in IOS?
编辑2:不,它也不适用于iOS http://iphonetester.com/
No, it also doesn't work with iOS http://iphonetester.com/
推荐答案
你试过吗
<meta name="viewport" width="device-width">
据我了解 width =device-width
将布局的宽度限制为设备宽度。当然设置 intial-scale = 1
然后告诉浏览器缩放100%(即不缩放)?
As I understand it width="device-width"
constrains the width of the layout to the device width. Surely setting intial-scale=1
is then telling the browser to zoom 100% (i.e. not scaled)?
更新
<meta name="viewport" content="width=device-width, initial-scale=1;"/>
旨在用于正确扩展响应式网站。考虑到您的网站固定宽度为1100像素,设置 initial-scale = 1
不会导致整个页面可见。
Is intended to be used to scale responsive sites correctly. Considering your site is fixed to a width of 1100px, setting initial-scale=1
will not result in the whole page being visible.
来自W3C 使用Meta Viewport元素识别所需的屏幕尺寸
这篇关于meta name =" viewport"没有按预期工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!