重置主体body的滚动条

    1. body::-webkit-scrollbar {
    2. width: 10px;
    3. height: 1px;
    4. }
    5. // 滚动条主体
    6. body::-webkit-scrollbar-thumb {
    7. background: #aaa !important;
    8. border-radius: 10px;
    9. -webkit-box-shadow: inset 0 0 5px rgba(168, 168, 168, 0.1);
    10. }
    11. // 滚动条背景
    12. body::-webkit-scrollbar-track {
    13. background: #ededed !important;
    14. border-radius: 10px;
    15. -webkit-box-shadow: inset 0 0 5px rgba(116, 116, 116, 0.1);
    16. }

    横向滚动轴,

    1. .ant-table-body::-webkit-scrollbar {
    2. width: 10px;
    3. height: 10px; // 高度为10
    4. }
    5. .ant-table-body::-webkit-scrollbar-thumb {
    6. background: #ccc;
    7. border-radius: 10px;
    8. -webkit-box-shadow: inset 0 0 5px rgba(168, 168, 168, 0.1);
    9. }
    10. .ant-table-body::-webkit-scrollbar-track {
    11. background: #ededed;
    12. border-radius: 10px;
    13. -webkit-box-shadow: inset 0 0 5px rgba(116, 116, 116, 0.1);
    14. }

    image.png