如何使用snap-content ellement中的angular-snap.js创建修复btn

时间:2015-07-24 11:51:02

标签: css angularjs scroll

如何在snap-content元素中创建固定位置 例如make



... { position: fixed; top: 5rem; right: 0; }

<button class="..." snap-toggle="right">Toggle Right</button> 
&#13;
&#13;
&#13;

in this example

当滚动按钮的页面位置时没有改变

1 个答案:

答案 0 :(得分:0)

用于使用jquery

添加此代码的临时解决方案
$('#ScrollElemntID').scroll(function () {
    var $win = $('#ScrollElemntID');
    $('.btnFix').css('top', $win.scrollTop());
});