CSS缩放属性 [英] CSS zoom property
问题描述
Windows版本的Internet Explorer
5.5及更高版本支持非标准属性zoom,它设置元素的
放大比例。
没有CSS3等价于这个
属性(至今)。
Internet Explorer for Windows versions 5.5 and above support the non-standard property zoom, which sets the magnification scale of an element. There’s no CSS3 equivalent to this property (as yet).
如何实现这个缩放效果在标准浏览器?任何jQuery插件可用?
How can I achieve this zoom effect in standard browsers? Any jQuery plugins available?
推荐答案
CSS3等效项在 CSS 2D Transforms 模块,特别是 transform:scale()
。
The CSS3 equivalent is in the CSS 2D Transforms module, in particular transform: scale()
.
因为此模块仍处于工作草稿阶段,您需要使用浏览器特定的前缀:
Because this module is still at Working Draft stage, you'll need browser-specific prefixes:
transform: scale(2);
-moz-transform: scale(2);
-webkit-transform: scale(2);
-o-transform: scale(2);
您还可能需要 transform-origin
和浏览器特定的版本),使它的行为方式与 zoom
相同,你必须小心目标缩放
仅在IE,因为WebKit支持 transform
和 zoom
比例。
You may also need transform-origin
(and browser-specific versions) to make it behave the same way as zoom
, and you'll have to be careful to target zoom
only at IE, because WebKit supports both transform
and zoom
so would double-scale.
这篇关于CSS缩放属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!