There may be a problem with the URL. To test this, try using crosshair
instead of default
and check if the cursor changes. Also, note that the style might be cached in the browser, so pressing Ctrl+F5 on most browsers should reload the page without cache.
html, body {
cursor: url("images/39020_fPv_icon.ico"), url("images/39020.png"), crosshair;
}
If changing the cursor to a crosshair
resolves the issue, then the problem lies with your URLs. You can either troubleshoot the URLs or base64 encode the cursor images for two advantages:
- You won't have to worry about moving files or maintaining links.
- If you deploy to a new environment, you won't need to concern yourself with the cursor image locations.
However, encoding the images may increase the size of your CSS file. Since cursor images are typically small, this shouldn't be much of an issue.
To base64 encode an image, search "base64 encode image" online - a top result is base64-image.de, a site I have used before. Your CSS would then resemble something like this:
html, body {
cursor: url("data:image/gif;base64,R0lGODdhBQAFAPABAP////8AACwAAAAABQAFAAACCARihhe9q0wBADs=="), crosshair;
}
If changing from default
to crosshair
still doesn't yield any results, there are two possibilities:
- If you haven't provided any HTML code, it's possible that your browser isn't rendering anything. The HTML and body will only occupy space based on their content, so lack of content equals zero-sized HTML and body elements.
html {
height: 100%;
width: 100%;
}
- If there is content on the HTML but the cursor remains unchanged, it's possible that the cursor isn't being applied to all elements on the page. You can modify your cursor-related CSS to apply it to all elements within the body like this:
html, body, body * {
cursor: url("images/39020_fPv_icon.ico"), url("images/39020.png"), default;
}