I was wondering if there was a way to make css :onhover occur sooner (i.e. I’m 10px away from a link, and :onhover calls, while still 10px away).
Edit: I’m trying to figure out a way to change the :onhover distance for a scrollbar.
Edit 2: Here’s the code:
html {
overflow: auto;
}
body {
position: absolute;
top: 20px;
left: 20px;
bottom: 20px;
right: 20px;
padding: 30px;
overflow-y: scroll;
overflow-x: hidden;
}
::-webkit-scrollbar {
width: 5px;
}
/* Track */
::-webkit-scrollbar-track {
-webkit-border-radius: 10px;
border-radius: 10px;
border: none;
}
/* Handle */
::-webkit-scrollbar-thumb{
-webkit-border-radius: 10px;
border-radius: 10px;
background: rgba(200,200,200,0.1);
}
::-webkit-scrollbar-thumb:hover {
-webkit-border-radius: 10px;
border-radius: 10px;
background: rgba(200,200,200,0.8);
}
Add
CSS border propertyto the element which then will receive the hover event.Reference 1: jsFiddle Proximity Detector
Edit: I now see you’ve re-written a major edit to your Question.
I’ve looked at your code and have come up with a method that you might like for Chrome’s scrollbar!
Reference 2: jsFiddle Scrollbar Proximity Detector