我需要。左类已经完全充满了红色,如果正确的类有内容在它。目前它没有完全填充颜色到左div?我相信问题是与高度?我该如何实现它?
.container {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
border: 1px solid #bebebe;
border-radius: 5px;
}
.left {
background-color: red;
padding: 0 8px;
flex-grow: 1;
display: flex;
}
.right {
width: 100%;
background-color: blue;
}
<div class="container">
<div class="left">
<input type="radio" />
</div>
<div class="right">
<p>test2</p>
<p>test2</p>
<p>test2</p>
<p>test2</p>
<p>test2</p>
<p>test2</p>
</div>
</div>
1条答案
按热度按时间eaf3rand1#
只需在
.container
中将align-items: center;
更改为align-items: stretch;
: