Apply Border-Radius To Scrollbars with CSS

前端 未结 5 592
闹比i
闹比i 2020-12-15 04:02

To put it simple, this is what i want (obtained on a Webkit Browser using -webkit-scrollbar) :

An

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 04:46

    slim with rounded corners

    @-moz-document url-prefix() {
        .scrollbar {
            overflow: auto;
            width: 0.5em !important;
            scroll-behavior: smooth !important;
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3) !important;
            background-color: darkgrey !important;
            outline: 1px solid slategrey !important;
            border-radius: 10px !important;
        }
    }
    
    ::-webkit-scrollbar {
        width: 0.5em !important;
        scroll-behavior: smooth !important;
    }
    
    ::-webkit-scrollbar-track {
        -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3) !important;
    }
    
    ::-webkit-scrollbar-thumb {
        background-color: darkgrey !important;
        outline: 1px solid slategrey !important;
        border-radius: 10px !important;
    }

    Scrollbar is slim with rounded corners





    Scrollbar is slim with rounded corners





    Scrollbar is slim with rounded corners

提交回复
热议问题