CSS

变焦 | @viewport.zoom

@viewport.zoom

zoom CSS的描述符设置由@viewport定义的文档的初始放大倍数。

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

Related at-rule@viewport
初始值auto
百分比值the 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 */ zoom: auto; /* <number> values */ zoom: 0.8; zoom: 2.0; /* <percentage> values */ zoom: 150%;

auto用户代理将设置文档的初始缩放因子。用户代理可以使用绘制文档的画布区域的大小来找到该因素。

正式语法

auto | <number> | <percentage>

规范

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

浏览器兼容性

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support(Yes)No support(Yes)(Yes)No support

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