我正在开发一个网络应用程序,我想自动调整填充背景图像的三列 div 的大小,以便在我使用 ctrl- 和 + 放大或缩小时填充整个页面,就像jsfiddle.net一样,这就是我已经写了这个效果,但它失败了:
HTML:
<div id="three_columns_container">
     <div id="first-column">...</div>
     <div id="second-column">...</div>
     <div id="third-column">...</div>
</div>
CSS:
#first-column{
    background:('slice.png');
    width: 15%;
    height: 97%;
}
#second-column{
    background:('slice.png');
    width: 15%;
    height: 97%;
}
#third-column{
    background:('slice.png');
    width: 70%;
    height: 97%;
}
JS:
 $(window).resize(function(){
      $("#three_columns_container").height() = $(window).height * 0.97;
      $("#three_columns_container").width() = $(window).width* 0.97;
    });
这个链接可能有助于解决问题,但它并没有产生确切的效果 链接
我想知道是否有人可以帮助我