使用jq实现fixed定位随滚动条,左右滚动

var navLeft;
$(window).scroll(function(){
    navLeft = -$(window).scrollLeft();
    $(".navLine").css("left", navLeft);
})