問題:
I want to provide my visitors the ability to see images in high quality, is there any way I can detect the window size?我想讓我的訪問者能夠看到高質量的圖像,有什麼方法可以檢測窗口大小嗎?
Or better yet, the viewport size of the browser with JavaScript?或者更好的是,使用 JavaScript 的瀏覽器的視口大小? See green area here:在此處查看綠色區域:
解決方案:
參考一: https://stackoom.com/question/5EgL參考二: How to get the browser viewport dimensions?