问题:
How can I hook into a browser window resize event? 如何挂钩浏览器窗口调整大小事件?
There's a jQuery way of listening for resize events but I would prefer not to bring it into my project for just this one requirement. 有一种侦听调整大小事件的jQuery方式,但我不希望仅出于这一要求就将其引入我的项目中。
解决方案:
参考一: https://stackoom.com/question/2gyX/JavaScript窗口调整大小事件
参考二: https://oldbug.net/q/2gyX/JavaScript-window-resize-event