Change Scrollbar Width, Background Colour and Thumb Properties Using CSS

The following example shows, how to change scrollbar with, background colour , thumb colour and scrollbar hover properties.

Example : index.html
<!DOCTYPE html>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    /*scrollbar width */
    ::-webkit-scrollbar {

    /*scrollbar Track */
    /*scrollbar Thumb Handle */
      background: #0000ff;

    /*scrollbar Thumb Handle on hover */
      background: #408080; 
  <body style='min-height:1000px;'>
    <p style='line-height:30px;'>
    It was just a burger. Why couldn't she understand that? She knew he'd completely changed his life around her eating habits, so why couldn't she give him a break this one time? She wasn't even supposed to have found out. Yes, he had promised her and yes, he had broken that promise, but still in his mind, all it had been was just a burger.
    <p style='line-height:30px;'>
    It was difficult to explain to them how the diagnosis of certain death had actually given him life. While everyone around him was in tears and upset, he actually felt more at ease. The doctor said it would be less than a year. That gave him a year to live, something he'd failed to do with his daily drudgery of a routine that had passed as life until then.
Try it Yourself

Live Demo