Skip to content

Instantly share code, notes, and snippets.

@asadaly111
Created February 3, 2018 19:44
Show Gist options
  • Save asadaly111/e09ebfc6403471c439c742b0998513fe to your computer and use it in GitHub Desktop.
Save asadaly111/e09ebfc6403471c439c742b0998513fe to your computer and use it in GitHub Desktop.
custom scroll on specific div
<div id="container">
<div id="content"></div>
</div>
body { min-height: 1000px }
div#container { height: 200px; width: 300px; overflow: scroll; }
div#content { height: 1000px; }
div::-webkit-scrollbar {
width: 12px;
}
div::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}
div::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment