Flexbox甚至可以中心漂浮的孩子!
所以我可以简单地添加display:flex和justify-content:center;到容器
.container {
margin: 10px auto;
display:flex;
justify-content: center; /* align horizontal */
}
.wrapper {
width: 100%;
text-align: center
}
.container {
margin: 10px auto;
display: flex;
justify-content: center;
/* align horizontal */
}
.left {
width: 69%;
max-width: 350px;
background: blue
}
.right {
width: 29%;
max-width: 150px;
background: red
}
.Box {
float: left;
padding: 20px
}
Content
Content