htmlflex的⾼度,CSSFlex动态填充可⽤⾼度(⽆⾼度或位置)好吧我可以给⼀些纯CSS的解决⽅案,但它会是正确的与js做。
这是HTML的⼀部分
Needs to use full available height.
Automatically generates height from content.
Automatically generates height from content.
Automatically generates height from content.
Automatically generates height from content.
Natural content below
和CSS paert
.container {
position: relative;
}
.clear {
clear: both;
}
.fake-bg {
height: 100%;
position: absolute;
width: 50%;
z-index: -1;
}
.fake-bg:nth-of-type(1) {
background-color: #cff;
left: 0;
top: 0;
}
.fake-bg:nth-of-type(2) {
background-color: #ffc;
right: 0;
top: 0;
}
#e1, #e2 {float: left; width: 50%;}
#e1 {background-color: #cff;}
#e2 {background-color: #ffc;}
html的flex布局#e3 {background-color: #fcf; clear: both;}⼀个的jsfiddle例如

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。