Reputation: 91
What I want is that the scroll is overlaid and transparent, so the elements behind it are shown through.
And This is what I want the scrollbar to look like.
Transparent scrollbar with css
I tried all of the code in the above question, but it failed.
My current css is this.
::-webkit-scrollbar {
width: 10px;
background: transparent url('../../assets/transparentPNG.png') repeat !important;
}
::-webkit-scrollbar-track {
background: transparent url('../../assets/transparentPNG.png') repeat !important;
}
::-webkit-scrollbar-track-piece:start {
background: transparent url('../../assets/transparentPNG.png') repeat !important;
}
::-webkit-scrollbar-track-piece:end {
background: transparent url('../../assets/transparentPNG.png') repeat !important;
}
::-webkit-scrollbar-thumb {
background-color: rgba(67, 62, 78, 0.1);
opacity: 0.1;
}
::-webkit-scrollbar-button {
display: none;
}
::-webkit-scrollbar-corner {
display: none;
}
Upvotes: 0
Views: 3376
Reputation: 498
Try using this it works for me .
::-webkit-scrollbar {
display: none;
}
Upvotes: 1
Reputation: 53
If you just want to hide the scrollbar, here's an easy fix:
HTML:
<div>
...Lots of text
</div>
CSS:
div::-webkit-scrollbar { width: 0 }
div {
overflow: -moz-scrollbars-none; /* Firefox */
-ms-overflow-style: none; /* IE */
}
Upvotes: 1