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

前端 未结 12 662
猫巷女王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:37

    I would change zoom for transform in all cases because, as explained by other answers, they are not equivalent. In my case it was also necessary to apply transform-origin property to place the items where I wanted.

    This worked for me in Chome, Safari and Firefox:

    transform: scale(0.4);
    transform-origin: top left;
    -moz-transform: scale(0.4);
    -moz-transform-origin: top left;
    

提交回复
热议问题