views:

32

answers:

1

I know it's possible to use a grabbing cursor icon in Chrome (in gmail, of course), but I can't figure out how to implement it in my code. I have tried (in CSS):

body {
cursor: grab;
}

body {
cursor: -webkit-grab;
}


body {
cursor: url(http://www.worldtimzone.com/mozilla/testcase/css3cursors_files/grab.gif);
}

help?

+1  A: 

Here's the styling that gmail uses if that's the exact cursor style you're after:

body {
  cursor: url(https://mail.google.com/mail/images/2/openhand.cur), default !important;
}

You can test it out here.

Nick Craver
hmm it works! i actually already tried that, but without the default !import. I wonder what that does?
Alex
http://www.w3.org/TR/CSS2/cascade.html#important-rules
Robert
okay, next problem -> i have a mouseover event that calls a javascript function. in that function it sets the body's style to what's mentioned up above by nick craver. however, the cursor does not override the default cursor for a link in Chrome. after mouse-ing out of the link, the cursor is the grab icon.
Alex
@Alex - You could give the anchor itself a class with this style, or have it always have the class, since cursor only applies on hover.
Nick Craver
i think you mean a:hover, right? i tried that already... same deal
Alex
@Nick Craver sorry about that you were right... silly syntax error :)
Alex