首页 > 解决方案 > webkit-scrollbar 在 chrome 中不起作用

问题描述

我的 css 文件中有以下代码:

.workarea-view-scroll-wrapper::-webkit-scrollbar {
    width:0px;
    background: transparent;
}

当我在 chrome 中打开页面时,chrome 似乎将这些宽度和背景视为“无效的属性值”。我不确定是什么问题。

附上截图

标签: csswebkitscrollbar

解决方案


但是为什么你不去 # (id= ?, 无论如何试试这个:

/* width */
.workarea-view-scroll-wrapper::-webkit-scrollbar {
  width: 0.1px !important;
}

/* Track */
.workarea-view-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent !important; 
}
 
/* Handle */
.workarea-view-scroll-wrapper::-webkit-scrollbar-thumb {
  background: transparent !important; 
}

/* Handle on hover */
.workarea-view-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: transparent !important; 
}


推荐阅读