0

我在 jquery mobile 中开发的页面左侧有一个菜单 div。问题是当页面滚动时,菜单也会随着页面滚动到上方。我希望菜单一直固定。我怎样才能做到这一点?

4

3 回答 3

0
#div_id{
  position:fixed;
  }

我认为这会有所帮助!

于 2012-05-23T08:01:11.173 回答
0

position: fixed;在 CSS 中使用:

#myDiv {
    position: fixed;
    top: 100px;
    left: 0;
}
于 2012-05-23T08:00:34.367 回答
-1
#myDiv {
position: fixed!important;

  z-index: 1000!important;

top:55px !important

}
于 2012-06-20T12:50:40.843 回答