日期:2014-05-17 浏览次数:20698 次
<style type="text/css"> #leftbox{float:left;width:200px; background-color:#FF0000;} #midbox{float:left;width:200px;background-color:#FFFF00} .bottom{display:block;clear:both;margin-top:50px;background:#000000;width:300px;height:200px;color:#FFF;} </style> <div id="leftbox">22</div> <div id="midbox">左边的内容左边的内容左边的内容左边的内容左边的内容左边的内容左边的内容</div> <script> if(midbox.offsetHeight>leftbox.offsetHeight) leftbox.style.height=midbox.offsetHeight+"px"; else midbox.style.height=leftbox.offsetHeight+"px"; </script> <div class="bottom">sssssssssssss</div>
------解决方案--------------------
学习
------解决方案--------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META NAME="Keywords" CONTENT=""> <META NAME="Description" CONTENT=""> </HEAD> <style> .container{ display:table; width:600px; background:#ff6600; margin:0px; padding-top:0; padding-right:0; padding-bottom:0; padding-left:0; } .leftbox{ width:300px; background:#f00; float:left; height:100%; } .rightbox{ width:300px; height:100%; background:#c90; float:right; } </style> <BODY> <div class="container"> <div class="leftbox"> 就何必何必何必何必何必何必何必何必何必何必 </div> <div class="rightbox"> 必何必何必何必何必何必何必何必何必何必何必何必何必必何必何必何必何必何必何必何必何必何必何必何必何必何必何必何必必何必何必何 </div> </BODY> </HTML>