网页中固定顶部div,并让div不被覆盖。 #top { position: fixed; top: 0; left: 0; right: 0;z-index:1; ...其他属性 } 取法其上,得乎其中,取法其中,得乎其下,取法其下,法不得也。