CSS - Scale (Zoom Factor)
Table of Contents
1 - About
Scale is the zoom level of a page is first loaded.
When the zooming factor is exactly 100%, one CSS pixel equals one device pixel.
2 - Articles Related
3 - Management
3.1 - Default
The scale when the page is loaded is defined by the viewport meta tag
3.2 - Maximum, minimum
The maximum-scale, minimum-scale, and user-scalable properties are defined by the viewport meta tag
3.3 - Calculation
You can calculate that factor by dividing screen.width by window.innerWidth
onResize = function () {
zoomFactor=window.innerWidth/screen.width;
console.log("The Zooming factor is "+zoomFactor);
}
onResize();
window.onresize = function () {
zoomFactor=window.innerWidth/screen.width;
console.log("The Zooming factor is "+zoomFactor);
}