Last active
September 5, 2020 22:23
-
-
Save shmdhussain/fe0d442db4070126c7e97658142459d8 to your computer and use it in GitHub Desktop.
ViewPort Information
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("The Screen Width(these dimensions are measured in device pixels because they never change: they’re a feature of the monitor, and not of the browser."); | |
console.log("the browser width in css px is (no device pixel)" + window.innerWidth); | |
console.log("the browser width height in css ps is (no device pixel)" + window.innerHeight); | |
console.log("the layout viewport width in css px" + document.documentElement.clientWidth); | |
console.log("the layout viewport height in css px" + document.documentElement.clientHeight); | |
console.log("devicePixelRatio:"+window.devicePixelRatio) | |
console.log("the screen device width in dev px is " + screen.width); | |
console.log("the screen device height in dev px is " + screen.height); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment