網頁XY卷軸美化

XY卷軸美化+自定義scrollbar better customize

  1. /* ==UserStyle==
  2. @name 網頁XY卷軸美化
  3. @namespace https://gf.qytechs.cn/zh-TW/users/4839
  4. @version 1.7.3
  5. @description XY卷軸美化+自定義scrollbar better customize
  6. @author Leadra
  7. @license MIT
  8. @preprocessor stylus
  9. @var color scroll_border "卷軸框色" rgba(115, 100, 255, 1)
  10. @var range scroll_bordersize "卷軸框" [2, 0, 5, 1, "px"]
  11. @var color scroll_background "卷軸背景色" rgba(200, 200, 250)
  12. @var color scroll_move "卷軸移入背景色" rgb(68, 136, 238,1)
  13. @var color scroll_bar "背景色" rgba(0,0,0,0)
  14. @var range scroll_radius "卷軸圓滑度" [5, 0, 15, 1, "px"]
  15. @var range scroll_wh "卷軸寬高" [10, 0, 20, 1, "px"]
  16.  
  17. ==/UserStyle== */
  18.  
  19. //針對新版chromeYT框架內優先設定
  20. html {
  21. scrollbar-color: auto !important;
  22. scrollbar-width: auto !important;
  23. }
  24.  
  25. ::-webkit-scrollbar {
  26. width: scroll_wh !important;
  27. height: scroll_wh !important;
  28. background: rgba(0, 0, 0, 0);
  29. }
  30. /*背景*/
  31. ::-webkit-scrollbar-track {
  32. box-shadow: inset 0 0 0 5px scroll_bar;
  33. }
  34.  
  35. /*卷軸*/
  36. ::-webkit-scrollbar-thumb {
  37. border: scroll_bordersize solid scroll_border !important;//#48e
  38. background: scroll_background !important;
  39. border-radius: scroll_radius!important;
  40. }
  41.  
  42. /*卷軸移入*/
  43. ::-webkit-scrollbar-thumb:hover {
  44. background: scroll_move !important;
  45. }
  46.  
  47. ::-webkit-scrollbar-corner {
  48. background: rgba(0, 0, 0, 0);
  49. }
  50. /*
  51. chrome 在 121版 引入firefox的 scrollbar-width 特性 這個之前在Firefox才有
  52. scrollbar-width 只有 auto, thin, none 三種選擇
  53. 範例:
  54. scrollbar-color: var(--main-color, #c1c1c1) rgba(0, 0, 0, 0) !important;
  55. scrollbar-width: auto ;
  56. */

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址