<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar</title>
</head>
<body>
<h1>A gradient scrollbar! Isn't it pretty?</h1>
</body>
</html>
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&family=Poppins:wght@400;700&family=Roboto&display=swap');
html, body {
width: 100%;
height: 100%;
font-family: 'Montserrat';
}
html {
height: 50rem;
}
body {
display: flex;
align-items: center;
justify-content: center;
}
::scrollbar-track {
background: #faedcd;
}
::scrollbar {
width: 10px;
}
::scrollbar:horizontal {
display: none;
}
::scrollbar-thumb {
background: linear-gradient(#4158D0, #C850C0, #FFCC70);
border-radius: 20px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.