如何使滚动条不可见 - 透明 [英] How to make scrollbar invisible - transparent

查看:73
本文介绍了如何使滚动条不可见 - 透明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,是否可以使滚动条隐藏",我不想使用溢出-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.

这篇关于如何使滚动条不可见 - 透明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆