如何使滚动条重叠页面内容 [英] How to make scrollbar overlapping page content
本文介绍了如何使滚动条重叠页面内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想让滚动条与页面重叠。我想知道是否有办法用纯CSS来做到这一点。我阅读了一篇关于CSS样式化滚动条的文章(
I want to make scrollbar that overlaps the page. I wonder if there is a way to do it with pure CSS. I read an article about styling scrollbars with CSS (https://css-tricks.com/custom-scrollbars-in-webkit) but I didn't get a result I wanted. I think it would be possible to do it with some JavaScript and HTML element with fixed position, but I prefer to do it with CSS.
推荐答案
您可以尝试将滚动条的背景更改为透明
You can try changing the background of the Scrollbar to transparent-
::-webkit-scrollbar-track {background: transparent}
这篇关于如何使滚动条重叠页面内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文