盒子使用 margin:0 auto 做到水平居中,盒子本身需要设置宽度
父盒子若未设置宽度,而是由子盒子的宽度撑开,则margin:0 auto 不起作用