请看一下这把小提琴:
https://jsfiddle.net/L4r5aftq/
<div id="app">
<div class="address-card-container" style="background-color: pink;">
<v-card>
<div class="card-content-container">
<div class="icon-container" style="width: 30px;">
<v-icon>calendar</v-icon>
</div>
<div style="margin-left: 20px;">
<p><strong>Our Home</strong></p>
<p>123 4th Avenue N</p>
</div>
</div>
</v-card>
<v-divider horizontal class="mx-4"></v-divider>
<v-card class="add-property-card" style="margin: auto;">
<div class="card-content-container">
<div class="icon-container" style="width: 15px"><v-icon>add</v-icon></div>
<div class="add-property-container"><p>Add a property</p></div>
</div>
</v-card>
</div>
</div>
.address-card-container {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
margin-bottom: 60px;
align-items: stretch!important;
.card {
border: 1px solid #ccc;
width: 50%;
height: 100% !important;
min-height: 100% !important;
.card-content-container {
min-height: 50px;
display: flex;
flex-direction: row;
justify-content: center;
margin: 30px 7%;
.icon-container {
.v-icon {
height: 50px;
width: 100%;
color: #009FD4;
}
}
.add-property-container {
margin-left: 20px;
display: flex;
flex-direction: column;
justify-content: center;
}
}
}
.add-property-card {
cursor: pointer;
}
}
它由flex box内的两张卡片组成,配置为行和空格:
我试图设置每张卡的高度,使其占据flex box的100%,但它不起作用。
如果你去拉小提琴,你会看到我设定了高度:100%!重要和最低身高:100%!很重要。我还设置了对齐项目:拉伸!在flex box中很重要。但是右边的卡不想占据flex box的整个高度。
我怎样才能让卡片占据整个弹性盒子的高度?