CSS position:fixed without top gives unexpected layout?
问题 Given: <body> <div id="fixed"> Fixed div </div> <div id="nonfixed"> <p>Non-fixed div</p> <p>Non-fixed div</p> <p>Non-fixed div</p> </div> </body> And: * { box-sizing: border-box; } body { margin: 0; padding: 0; } #fixed { position: static; width: 100%; border: 3px solid #f00; } #nonfixed { margin-top: 50px; border: 3px solid #00f; } Note that position:static , this gives the expected result (fiddle): However, change position:static to fixed , and you get this (fiddle) Even though the #fixed