CSS zoom property

前端 未结 2 1343
有刺的猬
有刺的猬 2021-01-05 12:27

Sitepoint reference says

Internet Explorer for Windows versions 5.5 and above support the non-standard property zoom, which sets the magnificatio

2条回答
  •  春和景丽
    2021-01-05 13:04

    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);
    

    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.

提交回复
热议问题