Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Ovo će web mjesto raditi na ograničen način, dok obavljamo održavanje stranice. Ako neki članak ne riješi tvoj problem i ako želiš postaviti pitanje, naša zajednica za podršku spremna je pomoći na Twitteru @FirefoxSupport i na Redditu /r/firefox.

Pretraži podršku

Izbjegni prevare podrške. Nikad te nećemo tražiti da nas nazoveš, da nam pošalješ telefonski broj ili da podijeliš osobne podatke. Prijavi sumnjive radnje pomoću opcije „Prijavi zlouporabu”.

Saznaj više

How to set zoom on a element using Javascript on Firefox?

more options

I can change a page element on Chrome using zoom

document.getElementById("pane-side").style.zoom = 0.5

Looks like Firefox did not support zoom, when i run the same code nothing happens.

Im searching for how to use zoom on Firefox, and i got this code:

document.getElementById("pane-side").style["-moz-transform"] = "scale(0.5)" But the result was not what I expected:

https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/images/2021-01-04-17-23-44-fa1a16.png

Im trying to zoom out the element like on Chrome, any advice?

I can change a page element on Chrome using zoom '''document.getElementById("pane-side").style.zoom = 0.5''' Looks like Firefox did not support zoom, when i run the same code nothing happens. Im searching for how to use zoom on Firefox, and i got this code: '''document.getElementById("pane-side").style["-moz-transform"] = "scale(0.5)"''' But the result was not what I expected: https://user-media-prod-cdn.itsre-sumo.mozilla.net/uploads/images/2021-01-04-17-23-44-fa1a16.png Im trying to zoom out the element like on Chrome, any advice?
Priložene slike ekrana

Svi odgovori (3)

more options

Hello, any help?

more options

Try this instead:

  • document.getElementById("pane-side").style.transform = "scale(0.5)";
more options

Same result as of document.getElementById("pane-side").style["-moz-transform"] = "scale(0.5)"