flexbox布局最后一行未对齐

时间:2017-10-24 06:15:11

标签: css css3 flexbox

作为标题,我使用flex css布局,我看过链接( Flex-box: Align last row to grid)。但最后一行无法对齐。

感谢



html,body {
  display: flex; 
  flex-wrap: wrap; 
  justify-content: space-around;
}

div {
  width: 300px;
  height: 300px;
  background-color: blue;
  border: 1px solid red;
}

body:after {
  content: "";
  flex: auto;
}

<body style='display: flex; flex-wrap: wrap; justify-content: space-around;'>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>

  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  
  <div></div>
  <div></div>
</body>
&#13;
&#13;
&#13;

0 个答案:

没有答案