我使用以下代码来平滑滚动。
html,body
{
width:100%;
height:100%;
margin:0px;
padding:0px;
overflow-x:hidden;
scroll-behavior:smooth;
}
最佳答案
The scroll-behavior property specifies whether to smoothly animate the scroll position, instead of a straight jump, when the user clicks on a link within a scrollable box.
Here就是如何使用smooth scroll
关于html - 我创建了一个移动响应网站。一切正常,但无法流畅滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55902896/