I need to change custom cursor for scrollbar in Chrome. I have lightbox which has set custom cursor with big X and Close text. Problem is that in chrome the cursor definition is inherited by the scrollbar as well, which looks a bit funny.
See the fiddle:
<div class="below">
<div class="full">
<div class="scrollable">long text</div>
</div>
</div>
CSS:
.full{
position:fixed;
background:red;
height:100%;
width:80%;
overflow-y:scroll;
cursor: url('cursor.cur'),not-allowed;
}
.scrollable{
padding:1em;
background:white;
position:relative;
display:block;
width:80%;
margin:50px auto;
}
http://jsfiddle.net/3fY9r/1/
is there any way how to trigger the scrollbar only and change the appearance back to default cursor?
Customize cursor. The basic way to customize your cursor is by using the cursor property with url() value. One thing to remember here is you have to use the auto as a fallback value. However, with cursor: url('...'), auto; you don't have that much control.
If your cursor changes to an arrow, you might have pressed the middle button or scroll wheel on your mouse accidentally. This is not a problem until it starts occurring frequently. If this problem occurs frequently, you should scan your system with antivirus and update or reinstall your mouse driver. Hope this helps.
You can use the vendor selectors for chrome's scrollbar to set styles. However, I don't think it will allow you to change the cursor. You could try this to see if it works:
::-webkit-scrollbar {
cursor:pointer;
}
UPDATE
After looking more into this issue, apparently there is a bug with Chrome and updates to the cursor on scrollbars. Here is the ticket, it is still open. You can still change the styles, but the customizations seem a bit limited.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With