时间:2021-07-01 10:21:17 帮助过:17人阅读
它主要是采用“隐藏容器溢出”和“正内补丁”和“负外补丁”结合方式,示例代码如下:
< html XMLns ="http://www.w3.org/1999/xhtml" >
< head >
< meta http-equiv ="Content-Type" content ="text/html; charset=utf-8" />
< title > Div + CSS Example, Wayhome's Blog title >
< style type ="text/css" >
style > head >
< body >
< div id ="wrap" style ="width:300px; background:#FFFF00;" >
< div id ="sidebar_left" style ="float:left;width:100px; background:#FF0000;" > Left div >
< div id ="sidebar_mid" style ="float:left;width:100px; background:#666;" >
Middle < br />
Middle < br />
Middle < br />
Middle < br />
Middle < br />
Middle < br />
Middle < br />
Middle < br />
Middle < br />
div >
< div id ="sidebar_right" style ="float:right;width:100px; background:#0000FF;" > Right div >
div >
body >
html >