私は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。