Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 镀铬滚动条不出现,只是白色间隙?_Html_Css - Fatal编程技术网

Html 镀铬滚动条不出现,只是白色间隙?

Html 镀铬滚动条不出现,只是白色间隙?,html,css,Html,Css,我有一个问题,我的页面上的滚动条没有出现在Mac上的Chrome中(没有在PC上尝试过)。不过,它在Firefox中也可以正常工作 我试过以下方法 ::-webkit-scrollbar { all: unset; display: block; } 无济于事 在我看来,这是预期的行为,在macOS上空闲的滚动条是不可见的,您可以尝试以下方法使它们始终可见 ::-webkit-scrollbar { -webkit-appearance: none; width: 7px;

我有一个问题,我的页面上的滚动条没有出现在Mac上的Chrome中(没有在PC上尝试过)。不过,它在Firefox中也可以正常工作

我试过以下方法

::-webkit-scrollbar {
  all: unset;
  display: block;
}
无济于事


在我看来,这是预期的行为,在macOS上空闲的滚动条是不可见的,您可以尝试以下方法使它们始终可见

::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 7px;
}

::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: rgba(0, 0, 0, .5);
  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5);
}

如果你通过鼠标滚轮或触摸板手势滚动会发生什么?它工作正常,我就是看不见@Larsbeck好的,检查我的答案