I'm trying to make a CSS code that changes the cursor to a picture file when the cursor is on a webpage. I've seen sites that give you a simple code to do it but they always have ads. Any codes you guys know that can do this?
-
1Just because you can change the cursor, doesn't always mean you should. You can really irritate people using your site if you arbitrarily use a custom cursor. Only do it if it makes sense to do so.Etzeitet– Etzeitet2009-07-17 18:12:43 +00:00Commented Jul 17, 2009 at 18:12
-
@pspain, actually I only intend for the members of my site to have this option. So they can have it on or off. I'm not just using it because.Tony C– Tony C2009-07-17 18:21:18 +00:00Commented Jul 17, 2009 at 18:21
-
The last question was about marquee and now this... I'm sorry but are you from the past?marcgg– marcgg2009-08-17 20:57:59 +00:00Commented Aug 17, 2009 at 20:57
Add a comment
|
3 Answers
Yes, simply apply the following css code to your body tag (assuming you want effect for whole page):
body {
cursor: url('URL to image');
}
Further information:
The image file must be 32x32 or smaller
Internet explorer only supports .cur files
3 Comments
Nico Burns
I assuming that you changed "images/curesorimagesfile.gif" to an actual image file. Otherwise, as I edited above, Internet Explorer only accepts .cur files. What browser/operating system are you using?
Nico Burns
If you are looking for software to create .cur files with, then I would recommend aniFX (icofx.ro/anifx/index.html)
Tony C
@Nico Burns, I'm using FireFox 3.5 Windows Vista With service pack 2. I'm uising a 32 x 32 gif image in the home directory. And using the code you gave me. I'll check out the program to.
CSS:
html{
cursor: url(URL of pictures)
}
Other Simples:
http://www.html1.freeiz.com/Your_cursor.html
http://jsfiddle.net/wNKcU/5/
http://jsfiddle.net/wNKcU/788/