在线文档教程
CSS

最小宽度 | @viewport.min-width

@viewport.min-width

min-widthCSS描述符指定通过@viewport所定义的文档的视口的最小宽度。

默认情况下,min-width考虑到最小宽度约束,将其设置为尽可能接近初始视口。

Related at-rule@viewport
初始值auto
百分比值refer to the width of the initial viewport
媒体visual, continuous
计算值if specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto
规范顺序the unique non-ambiguous order defined by the formal grammar

语法

/* Keyword value */ min-width: auto; /* <length> values */ min-width: 320px; min-width: 40em; min-width: 5cm; /* <percentage> value */ min-width: 25%;

auto使用的值是根据其他CSS描述符的值计算的。

形式语法

<viewport-length>where <viewport-length> = auto | <length-percentage> where <length-percentage> = <length> | <percentage>

规范

SpecificationStatusComment
CSS Device AdaptationThe definition of '"min-width" descriptor' in that specification.Working DraftInitial definition

浏览器兼容性

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support29 (behind a flag)No support10 -ms11.10 Removed in 15 Reintroduced behind a flag in 16No support

FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support4.429No support10-ms11.10 Removed in 15 Reintroduced behind a flag in 16No support