Viewport Tag Syntax
I have been looking on the web and I'm still confused on which works and does not. I see errors on chrome when I use the semi-colon, but the iPhone recognizes it. The comma works also without errors. I'm wondering which one is qualified as the correct way of writing it.
Semi Colons -
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
Commas -
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" / >
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
I'm just looking for a correct interpretation of why I have this error if both work,开发者_如何学运维 especially why it throws an error on Chrome.
Commas are the correct delimiters for viewport properties. iPhone Safari (and other browsers) might be more forgiving and interpret semicolons as delimiters as well, but then you're relying on the browser's error handling.
精彩评论