在flex布局中我们设置justify-content:end;的时候因为其他盒子的影响而无法向右对齐 这时浮动属性无法在flex布局下使用时下面这个方法可以轻松解决 div { margin-left:auto; }