Overall style:
. expressrecord single close {// parent element style
width: 100%;
height: auto;
display: flex;
justify-content: flex-start;
Align items: Center; // key stretch
position: relative;
}
The height of the right child element to expand the parent element:
.expressRecord-text {
margin-left: 30rpx;
padding-bottom: 20rpx;
flex-shrink: 0;
flex: 1;
}
The style of left child element adaptive parent element height needs to be implemented:
You can see that the child element still has a space to fill the parent element.
In this case, simply change the align items: Center; of the parent element toalign-items: stretch;
At this point, the child element box has already adapted to the height of the parent element.
Align items: stretch; the implementation is to stretch the side axis.