简体   繁体   English

当用户移动 hover 时如何增加滚动条宽度

[英]How increase scrollbar width when user mover hover on it

I am using simple-scrollbar I need to increase with of scrollbar when the user mouse hover on it (same as skype scrollbar) could you please help me with it, anyone how to write a script in jquery. (I just called css and js file into my HTML page)我正在使用简单滚动条,当用户将鼠标 hover 放在它上面时(与 Skype 滚动条相同)我需要增加滚动条,你能帮我吗,任何人如何在 jquery 中编写脚本。(我刚刚调用了 css 和 js文件到我的 HTML 页面)

below is my library for simple scrollbar:-下面是我的简单滚动条库:-

https://github.com/Grsmto/simplebar/tree/master/packages/simplebar#1-documentation https://github.com/Grsmto/simplebar/tree/master/packages/simplebar#1-文档

try #myElement:hover::-webkit-scrollbar { width: px; height: px; }试试#myElement:hover::-webkit-scrollbar { width: px; height: px; } #myElement:hover::-webkit-scrollbar { width: px; height: px; }

try this in.css:在 css 中试试这个:

.simplebar-track.simplebar-vertical {
  width: 20px;
}

.simplebar-track.simplebar-vertical .simplebar-scrollbar::before {
  left: 10px;
  transition: opacity 0s linear, left 0.2s ease-in-out;
}

.simplebar-track.simplebar-vertical.simplebar-hover .simplebar-scrollbar::before,
.simplebar-dragging .simplebar-track.simplebar-vertical .simplebar-scrollbar::before {
  left: 0px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM