2

我正在尝试使用引导词缀插件,但无法弄清楚如何让它滚动,这是我正在尝试做的一个示例。http://www.bootply.com/F6daY1KXoJ

我尝试使用此处描述的技术:http: //codepen.io/henrylfan/pen/HBnrJ但是当引用与附加项目不在同一个父项中的“底部”时,它不起作用。

//select a referenced box for bottom alignment
var bottomReferenceBox = $('.reference-box');

//calculate the bottom position
var bottomOffLine = $(document).height() - bottomReferenceBox.offset().top -       bottomReferenceBox.outerHeight();

$('.affix').affix({
  offset: {
    top: 100,
    bottom: bottomOffLine
  }
})
4

0 回答 0