CSS参考手册
设备适配 | Device Adaptation
变焦 | @viewport.zoom
zoom
CSS的描述符设置由@viewport
定义的文档的初始放大倍数。
一个缩放因子的1.0
或100%
不对应任何缩放。较大的值会放大。较小的值会缩小。
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
用户代理将设置文档的初始缩放因子。用户代理可以使用绘制文档的画布区域的大小来找到该因素。
<number>
用作缩放因子的非负数。1.0的因子意味着不进行缩放。大于1.0的值将导致放大效果,并且值会比缩小效果中的值小。
<percentage>
用作缩放因子的非负百分比值。100%的因子意味着没有缩放。大于100%的值会导致放大效果,并且其值会比放大效果小。
正式语法
auto | <number> | <percentage>
规范
Specification |
Status |
Comment |
---|---|---|
CSS Device AdaptationThe definition of '"zoom" descriptor' in that specification. |
Working Draft |
Initial specification |
浏览器兼容性
Feature |
Chrome |
Firefox (Gecko) |
Internet Explorer |
Opera |
Safari |
---|---|---|---|---|---|
Basic support |
(Yes) |
No support |
(Yes) |
(Yes) |
No support |
Feature |
Android |
Chrome for Android |
Firefox Mobile (Gecko) |
IE Mobile |
Opera Mobile |
Safari Mobile |
---|---|---|---|---|---|---|
Basic support |
? |
? |
? |
? |
? |
? |
设备适配 | Device Adaptation相关
层叠样式表( Cascading Style Sheets )是一种用来表现 HTML 或 XML 等文件样式的计算机语言。CSS 不仅可以静态地修饰网页,还可以配合各种脚本语言动态地对网页各元素进行格式化。