CSS-等高列?在CSS中,我可以这样做:但我不知道如何把它变成这样的东西:CSS有可能做到这一点吗?如果是,我如何才能不显式地指定高度(让内容增长)?
4 回答

ABOUTYOU
TA贡献1812条经验 获得超5个赞
#container3 { float:left; width:100%; background:green; overflow:hidden; position:relative;}#container2 { float:left; width:100%; background:yellow; position:relative; right:30%;}#container1 { float:left; width:100%; background:red; position:relative; right:40%;}#col1 { float:left; width:26%; position:relative; left:72%; overflow:hidden;}#col2 { float:left; width:36%; position:relative; left:76%; overflow:hidden;}#col3 { float:left; width:26%; position:relative; left:80%; overflow:hidden;}

偶然的你
TA贡献1841条经验 获得超3个赞
overflow: hidden
标记
<div class="container"> <div class="column"></div> <div class="column"></div> <div class="column"></div></div>
CSS
.container { overflow: hidden;}.column { float: left; margin-bottom: -10000px; padding-bottom: 10000px;}
结果

扬帆大鱼
TA贡献1799条经验 获得超9个赞
<style type='text/css"> .container { display: table; } .container .row { display: table-row; } .container .row .panel { display: table-cell; }</style><div class="container"> <div class="row"> <div class="panel">...text...</div> <div class="panel">...text...</div> <div class="panel">...text...</div> </div></div>
- 4 回答
- 0 关注
- 671 浏览
相关问题推荐
添加回答
举报
0/150
提交
取消