Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 html 页面中,我修复了我的标题:
position : fixed
当我向下滚动时,我的页面内容会通过标题。我怎样才能解决这个问题?
假设您的 HTML 如下:
<div id="header">...</div> <div id="content">...</div>
试试下面的 CSS:
<style type="text/css"> #header { position:fixed; z-index:1; } #content { position:relative; z-index:2; } </style>