您的位置:首页 > 其它

div动态元素自适应高度

2016-02-25 17:44 381 查看
<div class="tpsetbox" ng-repeat="item in items"  >
<div class="tpsettitbox"><span ng-bind="item.BuildName"></span>-<span ng-bind="item.PeriodName"></span></div>
<ul class="tpsetbuildingul">
<li ng-repeat="it in item.Building" class="col-xs-3 ">
<span  ng-click="checkBuildingStatus($parent.$index,$index,it.Status)"  style="position:relative;">
<label  ng-bind="it.BuildingName"></label>
<i class="fa fa-chevron-down buildcontrol"></i>
<span class="setBuildStatus status0 hide stat0{{$parent.$index}}{{$index}} ">已推盘</span>
<span class="setBuildStatus status1 hide stat1{{$parent.$index}}{{$index}} ">未推盘</span>
<span class="setBuildStatus status2 hide stat2{{$parent.$index}}{{$index}} ">不可推</span>
</span>

</li>
</ul>
<div style="font: 0px/0px sans-serif;clear: both;display: block"> </div>
</div>


以上是一种方法,在元素中间增加一个元素

<div style="font: 0px/0px sans-serif;clear: both;display: block"> </div>

还有一种方法是:

.tpsetbox{
min-height:50px; height:100%;overflow:hidden;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: