position: fixed 水平滚动定位

// header 水平滚动 absolute效果
window.onscroll=function(){
var sl=-Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
document.getElementById(‘top’).style.left=sl+’px’;
}