2
私は動的な高さと30%の幅で右divを持っています。 目的は、紫色の要素を右のdivの周りに浮動させ、残りのスペースを終了した後に取ることです。これはCSSでのみ可能ですか?別のdivの周りに浮かんでdivを伸ばした後
.container {
height: 500px;
width:100%;
}
.yellow {
width: 30%;
background: yellow;
float: right;
margin: 5px;
}
.purple {
background:purple;
height: 40px;
margin: 5px;
width:100%;
float:left;
}
<html>
<div class="container">
<div class="yellow"> some content here <br/><br/><br/> some content here </div>
<div class="purple"> </div>
<div class="purple"> </div>
<div class="purple"> </div>
<div class="purple"> </div>
</div>
</html>