Browse Source

修改滚动条样式

zengyicheng 2 năm trước cách đây
mục cha
commit
dda6e4e20d
2 tập tin đã thay đổi với 20 bổ sung1 xóa
  1. 19 0
      src/App.vue
  2. 1 1
      src/components/study.vue

+ 19 - 0
src/App.vue

@@ -350,4 +350,23 @@ body {
   width: 100%;
   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>

+ 1 - 1
src/components/study.vue

@@ -4374,7 +4374,7 @@ export default {
   background: #e7e7e7 !important;
 }
 .title {
-  background: rgb(72, 72, 72);
+  background: #1e5cc9;
   width: 98%;
   height: 45px;
   color: #fff;