div.testは固定高さではなく自動高さに設定されていました。今なぜposition:絶対;テスト部門の身長を拡大しますか?
.test {
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
background: yellow;
width: 200px;
height: auto;
padding: 10px;
}
<div class="test">
it is a test info for my div .
</div>
CSSでposition:absolute;
を追加するには、他のすべてのCSS属性は変更されません。
.test {
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
background: yellow;
width: 200px;
height: auto;
padding: 10px;
position: absolute;
}
<div class="test">
it is a test info for my div .
</div>
div.testの高さは、なぜ、拡大されたのですか?