爲內容模塊外面套上一層寬度爲100%的模塊,同時內容模塊的寬度少於屏幕寬度便可,如:margin
.head { width: 100%; border-top: 2px solid #FF9800; height: 60px;}.header { width: 1140px; height: 60px; margin: 0 auto;}top