Skip to content Skip to sidebar Skip to footer

Changing Page Scale Via Javascript

I wish to scale the body of my website acording to resolution, but the code not seems to work: document.body.style.transform: scale(window.screen.availHeight/2); document.body.styl

Solution 1:

Try

document.body.style.transform = 'scale(' + window.screen.availHeight/2 + ')';
document.body.style['-o-transform'] = 'scale(' + window.screen.availHeight/2 + ')';
document.body.style['-webkit-transform'] = 'scale(' + window.screen.availHeight/2 + ')';
document.body.style['-moz-transform'] = 'scale(' + window.screen.availHeight/2 + ')';

Post a Comment for "Changing Page Scale Via Javascript"