【发布时间】:2011-01-03 03:55:55
【问题描述】:
我正在使用来自 snipplr 的这个脚本,我将如何设置它以使容器 div 比 newWindowHeight 高度小 100px,例如 -100 或其他东西。
<script type="text/javascript" charset="utf-8">
$(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 );
}
});
</script>
【问题讨论】:
标签: jquery resize subtraction