问题
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:
Download bootstrap 3.3.7 version.
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