W3C 不验证视口
W3C don't validate Viewport
W3C don't validate my viewport meta tag知道为什么吗?
<title>DIDIx13</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<!-- Throws a warning "Consider avoiding viewport values that prevent users from resizing documents." -->
<meta name="keywords" content="DIDIx13" >
<meta name="description" content="I'm Darwin and welcome to my website" >
TL;DR
删除 "user-scalable=no"
现在验证器完全正常!
感谢this answer.
,我发现了"user-scalable=no"
的目的
Actually "user-scalable=no"
prevents the user from zooming. And it allows the browser to gain 300ms per click.
每次点击 300 毫秒?这真是太好了!我应该让"user-scalable=no"
但根据 efheng's answer.
,情况已不再如此
<meta name="viewport" content="width=device-width">
is enough to remove 300ms delay.
注意任何 -scale
属性 也会触发该警告
因此,您应该删除所有以下属性(如果存在)
- 用户可扩展
- 初始规模
- 最大规模
- 最小规模
W3C don't validate my viewport meta tag知道为什么吗?
<title>DIDIx13</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<!-- Throws a warning "Consider avoiding viewport values that prevent users from resizing documents." -->
<meta name="keywords" content="DIDIx13" >
<meta name="description" content="I'm Darwin and welcome to my website" >
TL;DR
删除 "user-scalable=no"
现在验证器完全正常!
感谢this answer.
,我发现了"user-scalable=no"
的目的
Actually
"user-scalable=no"
prevents the user from zooming. And it allows the browser to gain 300ms per click.
每次点击 300 毫秒?这真是太好了!我应该让"user-scalable=no"
但根据 efheng's answer.
,情况已不再如此
<meta name="viewport" content="width=device-width">
is enough to remove 300ms delay.
注意任何 -scale
属性 也会触发该警告
因此,您应该删除所有以下属性(如果存在)
- 用户可扩展
- 初始规模
- 最大规模
- 最小规模