因为项目需要设置div的高度在不同的浏览器尺寸上都显示良好,用height:auto是无效的,所以需要用js来解决,
于是设置这个div的id为bannerbig,并用js调用修改、自动改
//auto adapt clients height for banner which i rename it div id = "bannerbig"
function refreshSize(){
var totolHeight = document.documentElement.clientHeight;
var height = totolHeight - 70;
console.log(totolHeight + ' - ' + height);
document.getElementById('bannerbig').style.height = height+'px';
};
refreshSize();
window.onresize = refreshSize;
</script>