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

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

<style>
.txt{
    width:100px;
    height:100px;
    border:1px solid #333;
}

</style>

<span class="txt" ></span >   
var x=0;
$(window).resize(function() {
  $('txt').text(x+=1);
});

时间resize的语法格式:

  

$(selector).resize()

 

 

相关文章:

  • 2021-07-17
  • 2021-12-23
  • 2021-12-20
  • 2021-11-16
  • 2022-12-23
  • 2021-06-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
  • 2021-11-23
  • 2021-12-08
  • 2021-12-04
  • 2021-12-09
相关资源
相似解决方案