Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

滚动条美化 支持谷歌 #56

Open
Lee981265 opened this issue Nov 7, 2020 · 1 comment
Open

滚动条美化 支持谷歌 #56

Lee981265 opened this issue Nov 7, 2020 · 1 comment

Comments

@Lee981265
Copy link
Member

  <div
       class="textArea"
       @mouseover="OverY = 'overlay'"
       @mouseout="OverY = 'hidden'"
       :style="`overflow-y:${OverY}`"
    >
   </div>
@Lee981265
Copy link
Member Author

Lee981265 commented Nov 9, 2020

CSS滚动条选择器(伪元素选择器)

  • ::-webkit-scrollbar — 整个滚动条.
  • ::-webkit-scrollbar-button — 滚动条上的按钮 (上下箭头).
  • ::-webkit-scrollbar-thumb — 滚动条上的滚动滑块.
  • ::-webkit-scrollbar-track — 滚动条轨道.
  • ::-webkit-scrollbar-track-piece — 滚动条没有滑块的轨道部分.
  • ::-webkit-scrollbar-corner — 当同时有垂直滚动条和水平滚动条时交汇的部分.
  • ::-webkit-resizer — 某些元素的corner部分的部分样式(例:textarea的可拖动按钮).
      &::-webkit-scrollbar {
        width: 6px;
        background-color: #fff;
      }
      &::-webkit-scrollbar-thumb {
        border-radius: 4px;
        box-shadow: inset 0 0 6px rgba(2, 26, 67, 0.1);
      }
      &::-webkit-scrollbar-track {
        border-radius: 4px;
        background-color: #fff;
      }
      &::-webkit-scrollbar-track-piece {
        background-color: #eff2fb;
        border-radius: 6px;
      }

@Lee981265 Lee981265 changed the title 容器鼠标放上去显示滚动条,鼠标移开隐藏滚动条 滚动条美化 支持谷歌 Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant