我在頁面上有兩個div,其中一個浮動在右邊。我已經在div上設置了一個非浮動的最小寬度。當我縮小瀏覽器窗口時,浮動div會按照預期侵入非浮動div,但會繼續超過最小寬度並開始將非浮動div中的所有文本向下推送。我怎樣才能阻止浮動div移過某個點?我已經在下面列出了示例代碼。CSS - 浮動和調整大小的窗口
<html>
<head>
<style type="text/css">
#one
{
border: 1px red dotted;
margin-right: 500px;
min-width: 250px;
}
#two
{
border: 1px red dotted;
float: right;
width: 450px;
}
</style>
</head>
<div id="container">
<div id="two">
This is a floating div.
</div>
<div id="one">
This div is not floating and has a whole bunch of text inside of it.
</div>
</div>
</html>