在部分中包装盒子
A有一个<section>
和<article>
s。 当用户调整浏览器大小时,我想移动所有<article>
元素并将其宽度调整为100%。 我尝试用flex-box
。 这是我想要实现img http://up.programosy.pl/foto/boxes.jpg
JSFiddle在这里
section, article {
display: box;
}
article {
background: red;
margin: 10px;
display:-moz-box; /* Firefox */
display:-webkit-box; /* Safari and Chrome */
display:-ms-flexbox; /* Internet Explorer 10 */
display:box;
max-width: 300px;
min-width: 50px;
padding: 20px;
width: 100%;
overflow: hidden;
}
section {
display: -moz-box-flex;
background: blue;
}
删除你设置的max-width
。
更新jsFiddle - 我删除了左/右边margins
。