0
我如何获得这个DIV,当你删除如在标题2段落内容开始在同一高度即DIV变得错位的(开始在不同的高度}感谢制作DIV标签甚至
.holder {
width: 100%;
vertical-align: middle;
text-align: center;
}
.box {
display: inline-block;
width: 400px;
height: 400px;
margin: 15px 15px;
border: 1px solid #333;
}
<div class="holder">
<div class="box">
<h4>title 1</h4>
<p>
This is the hidden text that was revealed when the header was clicked. Such hidden text is generally related to the main header which opens them. You can add any number of collapsible headers
</p>
</div>
<div class="box">
<h4>title 2</h4>
<p>
This is the hidden text that was revealed when the header was clicked. Such hidden text is generally related to the main header which opens them. You can add any number of collapsible headers
</p>
</div>
</div>
完美谢谢! –
嗨,我也想知道高度通常是指元素的尺寸(400px)。我认为当你提到身高时,你的意思是元素(位置)相对于文档的最高位置。我认为这就是你想要达到的目标。你也可以设置'min-height'来设置元素的最小高度和'max-height',以使容器不会比特定的数量更大。只是一个FYI –
酷,是啊,这就是我想要的 –