Is -moz-transform: scale (2) `equivalent to CSS` zoom: 2`?

Is -moz-transform: scale(2)

CSS equivalent zoom: 2

?

I tried -moz-transform

it but unlike zoom

it cuts off the tops from my webpage.

function zoomOneX() {
    document.body.style.zoom = 1.2;    
    if (navigator.userAgent.indexOf("Firefox") != -1) {
        $('body').css('-moz-transform', 'scale(1.2,1.2)');
    }
}

      

+3


source to share


2 answers


No, scale doubles the element size

Scaling scales you to twice the size



transform: scale(2)

= Double size affecting actual size

zoom:2

= Reduces twice the current scaling, but does not affect the actual size of the element

+2


source


I would not say they are equivalent. A property zoom

in CSS allows you to scale your content, such as the camera's zoom function, and transform: scale

affects the size of the element and thus affects the surrounding elements.



See: http://css-tricks.com/almanac/properties/z/zoom/
AND: http://css-tricks.com/almanac/properties/t/transform/

+1


source







All Articles