Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 引导2.3.2粘贴底部在粘贴和粘贴底部之间跳跃_Jquery_Css_Twitter Bootstrap_Twitter Bootstrap 2_Affix - Fatal编程技术网

Jquery 引导2.3.2粘贴底部在粘贴和粘贴底部之间跳跃

Jquery 引导2.3.2粘贴底部在粘贴和粘贴底部之间跳跃,jquery,css,twitter-bootstrap,twitter-bootstrap-2,affix,Jquery,Css,Twitter Bootstrap,Twitter Bootstrap 2,Affix,我使用的是twitter bootstrap 2.3.2,其中包含了粘贴js。div完美地聆听top:500px;但底部有困难,在到达底部时,它会在每个像素的“粘贴”和“粘贴底部”之间切换div名称。看起来90年代很浮华,这在某种程度上很好,但不是我所期望的那样。有没有关于如何按应有的方式保持底部的想法?会让我开心的 js: $(".my-affix-div").affix({ offset: { top: 440, bottom: 270 } 和css: .affix{

我使用的是twitter bootstrap 2.3.2,其中包含了粘贴js。div完美地聆听top:500px;但底部有困难,在到达底部时,它会在每个像素的“粘贴”和“粘贴底部”之间切换div名称。看起来90年代很浮华,这在某种程度上很好,但不是我所期望的那样。有没有关于如何按应有的方式保持底部的想法?会让我开心的

js:

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

.affix{
    top:60px;
}

.affix-bottom {
    bottom:270px;
    position: absolute;
    top:auto;
}
  • 下载bootstrap 3.3.7版本

  • 在js文件夹中找到affix.js,将其添加到脚本标记中的Ur项目中


  • 我通过这个解决了我的问题…如果这有帮助,请告诉我。谢谢

    您有示例链接吗?我再也无法访问此代码,因此无法告诉您它是否有效:)。不过还是要谢谢你!