使用纯javascript和css,如何在触摸屏上滚动可点击的div列表?

问题描述 投票:0回答:1
javascript html css scroll touch
1个回答
0
投票

您无需尝试操作

#ListaCanzoni
上的滚动条,因为它没有滚动条。而且因为您在
overflow: hidden;
上设置了
body
,所以您根本无法滚动。 相反,您可以尝试以下操作:

:root::-webkit-scrollbar {
  display: none;
}
:root {
  scrollbar-width: none;
}

body  {
  background-color: #002;
}

::-webkit-scrollbar
用于基于 WebKit 的浏览器,例如 Chrome 或 Edge,
scrollbar-width: none;
用于基于 Gecko 的浏览器,例如 Firefox。

© www.soinside.com 2019 - 2024. All rights reserved.