scrollTo(0,document.getElementById('xxx').offset().top); 转载于:https://www.cnblogs.com/lzs-888/p/5916036.html