答案 0 :(得分:0)
你设置你的CSS只需在文件的末尾添加javascript代码,如...
<script type="text/javascript">
var h1=document.getElementById('div1').offsetHeight;
var h2=document.getElementById('div2').offsetHeight;
var h3=document.getElementById('div3').offsetHeight;
var h4=parseInt(h2)+parseInt(h3)+"px";
document.getElementById('div1').style.height=h4;
</script>
我运行此代码,它对我有用。