简体   繁体   English

当我在meta标签中定义content =“ max-width = 1200px;”时,媒体查询的工作方式

[英]How media queries are work when i define in meta tag content=“max-width=1200px;”

How media queries are work when i define in meta tag content="width=1200px;" 当我在元标记content =“ width = 1200px;”中定义时,媒体查询的工作方式 And my media queries are like 我的媒体查询就像

@media (max-width:480px){}
@media (max-width: 600px) {}

and etc. other media queries. 等其他媒体查询。

content="width=1200px" means your layout needs at least 1200 pixels of width. content =“ width = 1200px”表示您的布局至少需要1200像素的宽度。

For pages that set an initial or maximum scale, this means the width property actually translates into a minimum viewport width. 对于设置了初始或最大比例的页面,这意味着width属性实际上转换为最小视口宽度。

For example, if your layout needs at least 500 pixels of width then you can use the following markup. 例如,如果布局需要至少500像素的宽度,则可以使用以下标记。 When the screen is more than 500 pixels wide, the browser will expand the viewport (rather than zoom in) to fit the screen: 当屏幕的宽度超过500像素时,浏览器将扩大视口(而不是放大)以适合屏幕:

<meta name="viewport" content="width=500, initial-scale=1">

https://developer.mozilla.org/en/docs/Mozilla/Mobile/Viewport_meta_tag http://www.allenpike.com/2010/choosing-a-viewport-for-ipad-sites/ https://developer.mozilla.org/en/docs/Mozilla/Mobile/Viewport_meta_tag http://www.allenpike.com/2010/choosing-a-viewport-for-ipad-sites/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM