Skip to content

Instantly share code, notes, and snippets.

@melvinstanly
Last active September 4, 2018 10:18
Show Gist options
  • Save melvinstanly/4f6253edb28a2753930c29e9a673218c to your computer and use it in GitHub Desktop.
Save melvinstanly/4f6253edb28a2753930c29e9a673218c to your computer and use it in GitHub Desktop.
Css tricks
// Custom scrolling bar for select
// Solution for no scroll in MAC browsers
<html>
<head>
<style>
.frame::-webkit-scrollbar {
-webkit-appearance: none;
}
.frame::-webkit-scrollbar:vertical {
width: 11px;
}
.frame::-webkit-scrollbar:horizontal {
height: 11px;
}
.frame::-webkit-scrollbar-thumb {
border-radius: 8px;
border: 2px solid white; /* should match background, can't be transparent */
background-color: rgba(0, 0, 0, .5);
}
</style>
</head>
<body>
<div class="frame">
Foo<br />
Bar<br />
Baz<br />
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment