1
子供の幅を垂直フレックスボックスのコンテンツに制限するにはどうすればよいですか?シアンの背景からわかるように、子の幅はコンテナの幅を占めます。私はそれが必要な幅だけを占有したい。垂直フレックスボックスの子供の幅の幅
.container{
display: flex;
background: yellow;
flex-direction: column;
padding: 5px;
}
.content{
background: cyan;
margin: 5px;
}
<div class="container">
<div class="content">hello whats up</div>
<div class="content">hello whats up</div>
</div>
おかげでたくさん。これは動作します! – takeradi