I have a JavaScript webapp where the user needs to grab the background to move the whole screen around. So I want the cursor to change when they're hovering over the background. The -moz-grab
and -moz-grabbing
CSS cursors are ideal for this. Of course, they only work in Firefox... are there equivalent cursors for other browsers? Do I have to do something a little more custom than standard CSS cursors?
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
- Issue with star rating css
In case anyone else stumbles across this question, this is probably what you were looking for:
The closed hand cursor is not 16x16. If you would need them in the same dimensions, here you have both of them in 16x16 px
Or if you need original cursors:
https://www.google.com/intl/en_ALL/mapfiles/openhand.cur https://www.google.com/intl/en_ALL/mapfiles/closedhand.cur
CSS3
grab
andgrabbing
are now allowed values forcursor
. In order to provide several fallbacks for cross-browser compatibility including custom cursor files, a complete solution would look like this:You can create your own cursors and set them as the cursor using
cursor: url('path-to-your-cursor');
, or find Firefox's and copy them (bonus: a nice consistent look in every browser).I may be late, but you can try the following code, which worked for me for Drag and Drop.
You can use the images below in the URL above. Make sure it is a PNG transparent image. If not, download one from google.
I think
move
would probably be the closest standard cursor value for what you're doing: