Is there any possible way to change the cursor to an image? You know, like make the cursor an image you have made, namely PNG or BMP?
Would I need to make a .cur file? If so, how would I do this??
-magicyte
Is there any possible way to change the cursor to an image? You know, like make the cursor an image you have made, namely PNG or BMP?
Would I need to make a .cur file? If so, how would I do this??
-magicyte
Last edited by magicyte; 10-02-2008 at 09:21 PM. Reason: Thread Resolved
Learn how to code at 02geek
The more you learn, the more you'll realize there's much more to learn
Ray.ph!
Once you have your custom cursor, if it is for use directly on a web page (not in Flash or Java, etc.), it should be .ani or .cur, and you should use the proper css, ex:
However, support is limited.Code:<style type="text/css"> body { cursor: url(mycursor.cur); } </style>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Thank you for the links, Ranganna. And thanks, John, for telling me how to do it and that support is limited.
-magicyte
--------------------------------------------------Reviews, Interviews, Tutorials, and STUFF--------------------------------------------------Home of the SexyBookmarks WordPress plugin
Technically speaking (as far as good practice is concerned), it is a good idea to supply a fall back cursor, comma separated. In actual practice that is of limited value, as browsers that don't support url(cursor) will often choke there and never get to the comma separated fall back, but it does work in some browsers that don't support custom cursors:
Now, according to standards (what the validator should be looking at), I'm not sure what the issue is. I imagine it's that the syntax looks to the validator as two possibilities (which, if it were, would require a comma separator), or the validator just wants a fall back cursor, or the validator considers custom url(cursor) invalid, but isn't being very clear about it.Code:<style type="text/css"> body { cursor: url(mycursor.cur), text
; } </style>
In any case, it is the syntax that works in supporting browsers (with or without a comma separated fall back). If a fall back is supplied, some non-supporting browsers will use that, other non-supporting browsers will show whatever cursor they ordinarily would, as if no cursor directive were given. Some legacy or niche browsers may even have a major or minor problem of some sort with it no matter what you do, older browsers than that don't even support css.
As I said, "support is limited".
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
that's kind of what I figured, but just thought i'd ask to make sure.
Thanks John, I appreciate the reply.
--------------------------------------------------Reviews, Interviews, Tutorials, and STUFF--------------------------------------------------Home of the SexyBookmarks WordPress plugin
For the specification (what the validator should be using to evaluate the code we are talking about) see:
http://www.w3.org/TR/CSS21/ui.html#propdef-cursor
particularly:
From that, assuming it is being followed by the validator, I gather the reason is:<uri>
The user agent retrieves the cursor from the resource designated by the URI. If the user agent cannot handle the first cursor of a list of cursors, it should attempt to handle the second, etc. If the user agent cannot handle any user-defined cursor, it must use the generic cursor at the end of the list.
:link,:visited { cursor: url(example.svg#linkcursor), url(hyper.cur), pointer }
This example sets the cursor on all hyperlinks (whether visited or not) to an external SVG cursor. User agents that don't support SVG cursors would simply skip to the next value and attempt to use the "hyper.cur" cursor. If that cursor format was also not supported, the UA would skip to the next value and simply render the 'pointer' cursor.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Thanks guys for all of your advice. I will dilligently use it in my programming time!!
-magicyte
Bookmarks