Tag: 减去

jQuery:检测浏览器resize

我从snipplr使用这个脚本,我如何设置它,使容器div比newWindowHeight高度小100px,如-100或其他东西。 $(document).ready(function(){ //If the User resizes the window, adjust the #container height $(window).bind(“resize”, resizeWindow); function resizeWindow( e ) { var newWindowHeight = $(window).height(); $(“#container”).css(“max-height”, newWindowHeight ); } });