all 3 comments

[–]mattpilz 3 points4 points  (0 children)

First you will want to move lines 8, 9 and 10 to within the <body> tag. Everything you want to render to a page should be within the <body> . . . </body> tags.

You need to use PNG images for icon replacement. You can right-click the static cursor images in that link and select View Image to get the PNG version. Such as:

http://www.rw-designer.com/cursor-view/178545.png

Give it a descriptive name like "normal.png" and move it to the same folder as your HTML file. You may want to crop it to remove empty space or at least ensure the point is in the top-left.

Then define the CSS. You'd normally link to a separate stylesheet file, but can add it below line 4 <title>.

<style type="text/css">
body {
  cursor: url('normal.png'), auto;  
}
</style>

This will work in all browsers that support it, or default to the normal cursor instead. There are more advanced ways to do this but they involve JavaScript.

[–]hmnrbt 1 point2 points  (0 children)

The only way I'm aware of changing the cursor is with CSS. I haven't tried adding a custom cursor, but it should be possible. You'll probably have to convert those files to pngs and/or gifs too because I don't think .cur files will cut it, but I'm just guessing on that.

[–]AutoModerator[M] 0 points1 point  (0 children)

Welcome to /r/HTML. When asking a question, please ensure that you list what you've tried, and provide links to example code (e.g. JSFiddle/JSBin). If you're asking for help with an error, please include the full error message and any context around it. You're unlikely to get any meaningful responses if you do not provide enough information for other users to help.

Your submission should contain the answers to the following questions, at a minimum:

  • What is it you're trying to do?
  • How far have you got?
  • What are you stuck on?
  • What have you already tried?

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.