历史回退的时候保持原有的滚动

虽然改了scroll top,但是历史回退的时候保持原有滚动个

if ('scrollRestoration' in history) {
    history.scrollRestoration = 'manual';
}

你可能感兴趣的:(历史回退的时候保持原有的滚动)