在最外层div(父代)设置 最小宽度, 相对定位,弹性布局,在次一层的盒子(子代)设置 宽度。
body{ min-width: 1200px; height: 2000px; /*background: lightblue;*/ position: relative; display:flex; justify-content:center; } header{ width:1200px; }