CSS zoom property

前端 未结 2 1333
有刺的猬
有刺的猬 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.

    0 讨论(0)
  • 2021-01-05 13:16

    To complete the answer of scale transformations: why you not addressing IE as well? There is a specific -ms-zoom property, which will work in IE only: http://msdn.microsoft.com/en-us/library/ie/ms531189(v=vs.85).aspx

    0 讨论(0)
提交回复
热议问题