h5 滚动条

  1. @-moz-document url-prefix(http://),
  2. url-prefix(https://),
  3. url("chrome://browser/content/bookmarks/bookmarksPanel.xul"),
  4. url("chrome://browser/content/browser.xul"),
  5. url("chrome://browser/content/history/history-panel.xul") {


  6. /* 垂直滚动条 */
  7. scrollbar *
  8. scrollbar scrollbarbutton { display: none ! important; }
  9. scrollbar scrollbarbutton { visibility: collapse !important }

  10. scrollbar[orient="vertical"]
  11. {
  12. -moz-appearance: none !important;
  13. background-color: transparent !important; background-image: none !important; /* 滚动条背景透明 */
  14. min-width: 4px !important;
  15. max-width: 4px !important;
  16. -moz-margin-start: -4px !important; /* 把滚动条位置移到屏幕外,这里的像素应该等于垂直滚动条宽度的负值 */
  17. position: relative !important; /* 更改滚动条的定位方式为相对 */
  18. z-index: 2147483647 !important; /* 把滚动条提到Z轴最上层 */
  19. }

  20. /* 可以改变垂直滚动条的宽度,默认17px(必须同时改变,最小宽度和最大宽度完全相同) */
  21. /* 默认的垂直滚动条的宽度是17px */
  22. scrollbar[orient="vertical"]:hover
  23. {
  24. -moz-appearance: none !important;
  25. background-color: transparent !important; background-image: none !important;
  26. min-width: 4px !important;
  27. max-width: 4px !important;
  28. -moz-margin-start: -4px !important;
  29. position: relative !important;
  30. z-index: 2147483647 !important;
  31. }

  32. /* 滚动条按钮 */
  33. scrollbar thumb[orient="vertical"]
  34. {
  35. -moz-appearance: none !important;
  36. background-color: rgba(0,100,255,.5) !important;
  37. border-radius: 0px !important;
  38. min-width: 4px !important;
  39. max-width: 4px !important;
  40. border: 1px !important; /* 滚动条按钮边框 */
  41. border-color: rgba(0,100,255,.75) !important;  /* 滚动条按钮边框颜色和透明度 */
  42. border-style: none none none solid !important; /* 垂直滚动条按钮的左边框样式 */
  43. }

  44. /* 鼠标悬停样式: 滚动条按钮 */
  45. scrollbar thumb[orient="vertical"]:hover
  46. {
  47. background-color: rgba(0,100,255,.75) !important;
  48. border-radius: 0px !important;
  49. border: 0px !important;
  50. }

  51. /* 点击拖动样式:滚动条按钮 */ 
  52. scrollbar thumb[orient="vertical"]:active
  53. {
  54. background-color: rgba(0,100,255,.75) !important;
  55. border-radius: 0px !important;
  56. border: 0px !important;
  57. }

  58. /* 水平滚动条 */
  59. scrollbar[orient="horizontal"]
  60. {
  61. -moz-appearance: none !important;
  62. background-color: transparent !important; background-image: none !important;
  63. min-height: 4px !important;
  64. max-height: 4px !important;
  65. margin-top: -4px !important; /* 把滚动条位置移到屏幕外,这里的像素应该等于水平滚动条高度的负值 */
  66. position: relative !important; 
  67. z-index: 2147483647 !important;
  68. }

  69. /* 可以改变水平滚动条的高度,默认17px(必须同时改变,最小高度和最大高度完全相同) */
  70. /* 默认高度是17px */
  71. scrollbar[orient="horizontal"]:hover
  72. {
  73. -moz-appearance: none !important;
  74. background-color: transparent !important; background-image: none !important;
  75. min-height: 4px !important;
  76. max-height: 4px !important;
  77. margin-top: -4px !important;
  78. position: relative !important;
  79. z-index: 2147483647 !important;
  80. }

  81. /* 滚动条按钮 */
  82. scrollbar thumb[orient="horizontal"]
  83. {
  84. -moz-appearance: none !important;
  85. background-color: rgba(0,100,255,.5) !important;
  86. border-radius: 0px !important;
  87. min-height: 4px !important;
  88. max-height: 4px !important;
  89. border: 1px !important; /* 滚动条按钮边框 */
  90. border-color: rgba(0,100,255,.75) !important;  /* 滚动条按钮边框颜色和透明度 */
  91. border-style: solid none none none !important; /* 水平滚动条按钮的上边框样式 */
  92. margin-left: 0px !important;
  93. }

  94. /* 鼠标悬停样式: 滚动条按钮 */
  95. scrollbar thumb[orient="horizontal"]:hover
  96. {
  97. background-color: rgba(0,100,255,.75) !important;
  98. border-radius: 0px !important;
  99. border: 0px !important;
  100. }

  101. /* 点击拖动样式:滚动条按钮 */ 
  102. scrollbar thumb[orient="horizontal"]:active
  103. {
  104. background-color: rgba(0,100,255,.75) !important;
  105. border-radius: 0px !important;
  106. border: 0px !important;
  107. }

  108. /* 去除垂直与水平滚动条相交汇的角落 */
  109. scrollcorner{opacity: 0 !important;}
  110. scrollbar scrollcorner:hover {background:transparent !important;}

  111. }

你可能感兴趣的:(前端)