bootstrap 2.3.2 affix bottom jumps between affix and affix-bottom

喜夏-厌秋 提交于 2019-12-24 03:34:09

问题


I'm using twitter bootstrap 2.3.2 and included the affix js. The div perfectly listens to the top:500px; but has difficulties with the bottom, on reaching bottom, it switches the div name between affix and affix-bottom every pixel. Looking nineties flashy, which is nice in a way.., but not really how I would expect it. Any ideas on how to stick the bottom on the way it should be? Would make my day!!

The js:

$(".my-affix-div").affix({
  offset: {
    top: 440,
    bottom: 270
}

And the css:

.affix{
    top:60px;
}

.affix-bottom {
    bottom:270px;
    position: absolute;
    top:auto;
}

回答1:


  1. Download bootstrap 3.3.7 version.

  2. find affix.js in Js folder, add it to Ur project in script tag.

I solved my problem by this...if this helpful let me know. Thanks



来源:https://stackoverflow.com/questions/22915866/bootstrap-2-3-2-affix-bottom-jumps-between-affix-and-affix-bottom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!