Browse Source

修改滚动条样式

zengyicheng 2 years ago
parent
commit
f1506062b2
1 changed files with 19 additions and 0 deletions
  1. 19 0
      src/App.vue

+ 19 - 0
src/App.vue

@@ -330,4 +330,23 @@ body {
 .gHeight {
   height: 100%;
 }
+html::-webkit-scrollbar {
+  /*滚动条整体样式*/
+  width: 6px;
+  /*高宽分别对应横竖滚动条的尺寸*/
+  height: 6px;
+}
+
+/*定义滚动条轨道 内阴影+圆角*/
+html::-webkit-scrollbar {
+  border-radius: 10px;
+  background-color: #eee;
+}
+
+/*定义滑块 内阴影+圆角*/
+html::-webkit-scrollbar-thumb {
+  border-radius: 10px;
+  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
+  background-color: rgba(0, 0, 0, 0.1);
+}
 </style>