flex layout & demos
flex layout & demos
https://codepen.io/xgqfrms/pen/jjLPKN
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
.flex-box {
dispaly: flex;
border: 1px solid red;
height: 100px;
position: relative;
display: flex;
flex-flow: row wrap;
justify-content: flex-start;
align-items: stretch;
align-content: stretch;
box-sizing: border-box;
margin: 10px;
}
.flex-item {
height: 30px;
margin: 5px;
box-sizing: border-box;
margin: 0;
padding: 0;
}
.item1 {
flex: 1 1 auto;
width: 80vw;
background: #0f0;
}
.item2 {
flex: 0 1 auto;
width: 20vw;
background: #f0f;
}
.item3 {
flex: 1 1 auto;
width: 20vw;
background: #0f0;
}
.item4 {
flex: 0 1 auto;
width: 20vw;
background: #f0f;
}
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/11087968.html
未经授权禁止转载,违者必究!