absolute是绝对定位,有包裹性同时也有破坏性。
<style type="text/css"> .tianxia{ position:absolute; left:20px; top:10px; border:solid red 1px; } .title{ position: absolute; } .question{ width: 80px; height: 80px; border:solid red 1px; } </style>
<div class="tianxia"> <div class="title">this is a title</div> <div class="question">this is a question</div> </div>
得到的结果如下