css in vue modifies the scroll bar style

css in vue modifies the scroll bar style

Renderings:

insert image description here

Code (add the following styles globally in app.vue):

&::-webkit-scrollbar {
    
    
    width: 8px;
    height: 8px;
    border-radius: 3px;
  }

  /*定义滚动条轨道 内阴影+圆角*/

  &::-webkit-scrollbar-track {
    
    
    //-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.05);
  }

  /*定义滑块 内阴影+圆角*/

  &::-webkit-scrollbar-thumb {
    
    
    border-radius: 3px;
    //-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
    background: rgba(0, 0, 0, 0.15);
  }

Guess you like

Origin blog.csdn.net/qq_61950936/article/details/132423181