📜  html 滚动行为 - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:22.155000             🧑  作者: Mango

代码示例2
html {
  scroll-behavior: smooth;
}

// scroll-behaviour option
auto => Allows a straight jump "scroll effect" between elements within the scrolling box. This is default
smooth => Allows a smooth animated "scroll effect" between elements within the scrolling box.
initial => Sets this property to its default value.
inherit    => Inherits this property from its parent element.