我有一个div
里面有一些内容,并设置为white-space: nowrap;
当这种情况发生时div
保持相同的大小。我怎样才能使它div
继续包裹到现在漂浮在页面右侧的内容的末尾?
.parent {
border: 1px dotted blue;
}
.parent p {
border: 1px dotted red;
white-space: nowrap;
}
<div class='parent'>
<p>This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.</p>
<p>This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. This is some text.</p>
</div>