0

私はjqueryを使うのが初めてで、助けが必要です。私はscrolltofixed.jsを使用していて、左側を追加するのに助けが必要です:%%px。これは私がこれまでに持っているものです:

$(document).ready(function() {
    $('#socialbar').scrollToFixed( {marginTop: $('.header').outerHeight(true) + 7,});
    $('#socialbar').bind('fixed', function() {   });
    $('#socialbar').bind('unfixed', function() {  });

    $('#sidebar').scrollToFixed({
        marginTop: $('.header').outerHeight(true) + 15,
        fixed: function() {  },
    });
});

これは、ユーザーがページを下にスクロールし始めたときに#socialbar要素に何が起こるかです。

z-index: 1000; width: 58px; position: fixed; top: 7px; left: 70px;

助けてくれてありがとう、グレゴリーS。

4

1 に答える 1

0

メソッドを見てみましょうcss()

$('#socialbar').css('left', 'your value');
于 2012-05-27T18:03:39.397 に答える