如何使滚动条不可见 - 透明

问题描述:

嘿,是否可以使滚动条隐藏",我不想使用溢出-y:隐藏就像背景一样:透明或类似的东西

Hey is it possible to make scrollbar "hidden" i dont wanna use overflow-y: hidden just something like background: transparent or something like that

此处您将找到如何仅使用 CSS 隐藏滚动条的说明.
在第二个 example 中,您将找到一个解决方案,例如如何在 div 中隐藏滚动条.
第二个例子中的技巧是定义一个比周围更宽的 div 容器.

Here you will find a description how to hide the scrollbar just with CSS.
And here in the second example you will find a solution how to hide the scrollbar within a div for example.
The trick in the second example is to define a wider div container that the surrounding one.

.hidden-scrollbar .inner {
   height:200px;
   overflow:auto;
   margin:15px -300px 15px 15px;
   padding-right:300px;
}

只需使用边距和填充的值即可.

Just play arround with the values of margin and padding.