jQuery resize() 方法使用

$(window).resize(function(){ 

    $('span').text(x+=1);
 })

定义和用法

当调整浏览器窗口大小时,发生resize 事件。

resize() 方法触发 resize 事件,或规定当发生 focus 事件时运行的函数;

猜你喜欢

转载自blog.csdn.net/weixin_41455147/article/details/82967858