Skip to content

scrollbar-width ​

描述 ​

scrollbar-width 属性允许作者设置元素滚动条显示时的最大厚度。

注意

Chrome 浏览器不支持

效果展示 ​

语法 ​

css
/* Keyword values */
scrollbar-width: auto;
scrollbar-width: thin;
scrollbar-width: none;

值 ​

  • auto 平台的默认滚动条宽度。
  • thin 提供该选项的平台上的细滚动条宽度变体,或者比默认平台滚动条宽度更细的滚动条。
  • none 未显示滚动条,但该元素仍可滚动。