Html 视口参数值“设备宽度;” 对于键“宽度”无效,已被忽略。注意
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19250910/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Viewport argument value "device-width;" for key "width" is invalid, and has been ignored. Note that
提问by Chintu
I am getting this error in JavaScript:
我在 JavaScript 中收到此错误:
Viewport argument value "device-width;" for key "width" is invalid, and has been ignored. Note that ';' is not a separator in viewport values. The list should be comma-separated.
视口参数值“设备宽度;” 对于键“宽度”无效,已被忽略。注意 ';' 不是视口值中的分隔符。该列表应以逗号分隔。
How do I fix this?
我该如何解决?
回答by Dimas Pante
I had this same error. Oddly, it's quite simple to fix. Just change the semicolons for commas, like in:
我有同样的错误。奇怪的是,修复起来很简单。只需更改逗号的分号,例如:
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, user-scalable=yes">