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.
我在 jquery mobile 中开发的页面左侧有一个菜单 div。问题是当页面滚动时,菜单也会随着页面滚动到上方。我希望菜单一直固定。我怎样才能做到这一点?
#div_id{ position:fixed; }
我认为这会有所帮助!
position: fixed;在 CSS 中使用:
position: fixed;
#myDiv { position: fixed; top: 100px; left: 0; }
#myDiv { position: fixed!important; z-index: 1000!important; top:55px !important }