IE和Firefox的Bootstrap词缀滚动问题

时间:2014-03-13 18:09:58

标签: javascript jquery css twitter-bootstrap affix

我的网站上有侧边栏问题。我正在使用Bootstrap词缀将其修复到页面末尾,它应该在某一点上提出其余的内容......

它与Chrome和Safari完美搭配但是使用Firefox或IE,侧边栏并不总是随着滚动结尾的内容向上移动...当我慢慢滚动时,它工作正常,但如果我也滚动快速,侧边栏的底部将覆盖页脚。

This is a page您可以在其中看到它。

我找不到与该问题相关的任何信息。有人可以帮忙吗?

由于

1 个答案:

答案 0 :(得分:6)

这是Bootstrap中的一个错误,已在此处解决:https://github.com/iainvdw/bootstrap/commit/c786f454c9175cce5bcf9a7074a3e206533b3d1a

但是,它似乎不包含在您网站上使用的3.1.1版本中。

要手动执行此操作,请替换此行:

offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :

有了这个:

offsetBottom != null && (Math.ceil(position.top) + this.$element.height() >= scrollHeight - offsetBottom) ? 'bottom' :
相关问题