不经常写CSS,碰见一个问题是两个不相关div高度想让自动适应,用JavaScript来解决吧! <mce:script type="text/javascript"><!-- window.οnlοad=window.οnresize=function(){ if(document.getElementById("div_left").clientHeight<document.getElementById("div_right").clientHeight){ document.getElementById("div_left").style.height=document.getElementById("div_right").offsetHeight+"px"; } else{ document.getElementById("div_right").style.height=document.getElementById("div_left").offsetHeight+"px"; } } // --></mce:script>