我不能让一个对齐器与Chrome一起工作,但它同时在Firefox和Edge上工作。
我使用的是flex CSS:
body {
min-height: 100%;
display: flex;
flex-direction: column;
}
wrapper {
height: 100%;
/* flex: 1; would be enough but it looks bad in IE */
flex: 1 0 auto;
background-color: #3D9970;
在下面的图片中,按钮是取柔性盒的高度吗?为什么?我希望它是一个普通的按钮底部对齐左边的图像(白色方块)。
index.css
.grid-container{
display:grid;
grid-template-rows:[nav-row-start]auto [nav-row-end logo-nav-row-start] auto [logo-nav-row-end content-row-start] auto [content-row-end];
}
.nav-style{
height:5vh; /*make nav div take 5%
如何防止flexbox元素换行?这有可能吗?
我正在尝试用flexbox创建一个两列网格,带有以下标记:
<div class="flex-container">
<div class="no-wrap">this should not wrap</div>
<div class="can-wrap">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Totam debitis consequuntur incidunt