CSS

最大变焦 | @viewport.max-zoom

@viewport.max-zoom

max-zoomCSS的描述符集被定义文档的最大变焦倍数@viewport的规则。无论是自动还是根据用户的要求,浏览器都不会放大。

一个缩放因子1.0100%不对应任何缩放。较大的值会放大。较小的值会缩小。

Related at-rule@viewport
初始值auto
Percentagesthe zoom factor itself
适用媒体visual, continuous
计算值auto, or a non-negative number or percentage as specified
正规顺序the unique non-ambiguous order defined by the formal grammar

语法

/* Keyword value */ max-zoom: auto; /* <number> values */ max-zoom: 0.8; max-zoom: 2.0; /* <percentage> value */ max-zoom: 150%;

auto用户代理将设置文档的上限缩放因子限制。<number>限制缩放因子最大值的非负数。<percentage>限制缩放因子最大值的非负百分比。

正式语法

auto | <number> | <percentage>

规范

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

浏览器兼容性

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support?????

FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support??????