0
$("#content").scroll(function(e){
var distance_from_top = $("#content").scrollTop();
var theinverse = -1 * distance_from_top;
var theinverse2 = theinverse + "px";
$("#topheader").css("marginTop", theinverse2);
});
什么是最有效的方法来做到这一点?基本上使#topheader上边距等于从顶部滚动的负距离。什么是最有效的方式来做到这一点(jQuery的片段)?