画面サイズを取得する
Width | Height | 現在値 |
---|---|---|
screen.width | screen.height | x |
screen.availWidth | screen.availHeight | x |
window.outerWidth | window.outerHeight | x |
window.innerWidth | window.innerHeight | x |
window.devicePixelRatio | ||
document.body.clientWidth | document.body.clientHeight | x |
- Windowオブジェクト – MDN Web Docs