function doResize(divID) {
//store logo图片高度
const appconHeight = 110;
//store容器高度
var shelfOuterHeight = $(window).height()-540<appconHeight?appconHeight:$(window).height()-540;
//共显示几行store
var rowsCount = Math.floor(shelfOuterHeight/appconHeight);
//store容器占用的高度
var shelfInnerHeight = appconHeight*rowsCount;
//留白的高度
var marginTop = (shelfOuterHeight-shelfInnerHeight)/2;
var shelfSizeStyle = "height: "+shelfInnerHeight+"px;";
shelfSizeStyle += "margin-top: "+marginTop+"px";
$("#itemStoreShelf").attr("style",shelfSizeStyle);
$("#container").attr("style","height:"+($(window).height()-118)+"px");
$("#storeall_con").attr("style","height:"+shelfOuterHeight+"px");
}
<div id="storeall_con">
<div class="applist_con" id="appList_con1">
<div id="store_list_show" class="list_show">
<div id="itemStoreShelf" class="list_show">
<!-- 显示div -->
</div>
</div>
</div>
</div>
<body οnlοad='doResize("appList_con1");' οnresize='doResize("appList_con1");'>
去掉所有div中height的高度值。