如何在使用Javascript的容器中获得空白区域(例如白色区域)? 有没有准备好的jQuery函数或其他相同的东西?获取容器中的空白区域
我需要的宽度,高度,左和“空”中的白色区域的Javascript的顶部位置。
HTML
<div id="container">
<div class="box-item a">A</div>
<div class="box-item d">D</div>
<div class="box-item e">E</div>
<div class="box-item f">F</div>
</div>
CSS
.box-item {
width: 100px;
height: 100px;
background-color: grey;
display:block;
position:absolute;
}
#container {
position:relative;
width:300px;
height:300px;
min-width:300px;
max-width:300px;
}
.a {
position:relative;
left:100px;
width:200px;
height:200px;
}
.d {
left:0px;
top: 200px;
}
.e {
left:100px;
top: 200px;
}
.f {
left:200px;
top: 200px;
}
TIA frgtv10
你的空间意味着什么?你实际上想要得到什么? – 2012-08-01 09:32:23
这是什么,请添加更多信息,这是什么? – 2012-08-01 09:33:04
什么是“空白空间”以及“容器”应该是什么? – 2012-08-01 09:35:06