scrollbar.scss 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @import './index.scss';
  2. // 滚动条的宽度
  3. ::-webkit-scrollbar {
  4. width : 2px !important;
  5. height: 2px !important;
  6. }
  7. ::-webkit-scrollbar-track-piece {
  8. background-color: var(--next-bg-main-color);
  9. }
  10. // 滚动条的设置
  11. ::-webkit-scrollbar-thumb {
  12. background-color: rgba(144, 147, 153, 0.3);
  13. background-clip : padding-box;
  14. min-height : 28px;
  15. border-radius : 5px;
  16. transition : 0.3s background-color;
  17. }
  18. ::-webkit-scrollbar-thumb:hover {
  19. background-color: rgba(144, 147, 153, 0.5);
  20. }
  21. // element plus scrollbar
  22. .el-scrollbar__bar.is-vertical {
  23. width: 8px !important;
  24. }
  25. .el-scrollbar__bar.is-horizontal {
  26. height: 8px !important;
  27. }
  28. /* 页面宽度小于768px
  29. -------------------------------
  30. @media screen and (max-width: $sm) {
  31. // 滚动条的宽度
  32. ::-webkit-scrollbar {
  33. width: 3px !important;
  34. height: 3px !important;
  35. }
  36. ::-webkit-scrollbar-track-piece {
  37. background-color: var(--next-bg-main-color);
  38. }
  39. // 滚动条的设置
  40. ::-webkit-scrollbar-thumb {
  41. background-color: rgba(144, 147, 153, 0.3);
  42. background-clip: padding-box;
  43. min-height: 28px;
  44. border-radius: 5px;
  45. transition: 0.3s background-color;
  46. }
  47. ::-webkit-scrollbar-thumb:hover {
  48. background-color: rgba(144, 147, 153, 0.5);
  49. }
  50. // element plus scrollbar
  51. .el-scrollbar__bar.is-vertical {
  52. width: 2px !important;
  53. }
  54. .el-scrollbar__bar.is-horizontal {
  55. height: 2px !important;
  56. }
  57. }
  58. */
  59. /* 页面宽度大于768px
  60. -------------------------------
  61. @media screen and (min-width: 769px) {
  62. // 滚动条的宽度
  63. ::-webkit-scrollbar {
  64. width: 7px;
  65. height: 7px;
  66. }
  67. ::-webkit-scrollbar-track-piece {
  68. background-color: var(--next-bg-main-color);
  69. }
  70. // 滚动条的设置
  71. ::-webkit-scrollbar-thumb {
  72. background-color: rgba(144, 147, 153, 0.3);
  73. background-clip: padding-box;
  74. min-height: 28px;
  75. border-radius: 5px;
  76. transition: 0.3s background-color;
  77. }
  78. ::-webkit-scrollbar-thumb:hover {
  79. background-color: rgba(144, 147, 153, 0.5);
  80. }
  81. }
  82. */