How can I zoom an HTML element in Firefox and Opera?

前端 未结 12 664
猫巷女王i
猫巷女王i 2020-11-29 02:00

How can I zoom an HTML element in Firefox and Opera?

The zoom property is working in IE, Google Chrome and Safari, but it’s not working in Firefox and O

12条回答
  •  清酒与你
    2020-11-29 02:49

    Zoom and transform scale are not the same thing. They are applied at different times. Zoom is applied before the rendering happens, transform - after. The result of this is if you take a div with width/height = 100% nested inside of another div, with fixed size, if you apply zoom, everything inside your inner zoom will shrink, or grow, but if you apply transform your entire inner div will shrink (even though width/height is set to 100%, they are not going to be 100% after transformation).

提交回复
热议问题