Skip to content

Instantly share code, notes, and snippets.

@rnmp
Last active January 9, 2020 19:03
Show Gist options
  • Save rnmp/a47a1e32bc1db53cb7fdba6c5a789351 to your computer and use it in GitHub Desktop.
Save rnmp/a47a1e32bc1db53cb7fdba6c5a789351 to your computer and use it in GitHub Desktop.
Get screen + window resolutions
<html>
<body><script>document.body.innerHTML = `
<h1>Alright, alright, alright</h1>
<p>Screen resolution: ${window.screen.width}x${window.screen.height}
<p>Window resolution: ${window.innerWidth}x${window.innerHeight}
`;
</script></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment