Q:

How to create custom cursor using CSS

0

How to create custom cursor using CSS

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Use the CSS cursor property

You can define a custom cursor using the CSS cursor property. The cursor property takes the comma-separated list of user-defined cursors value followed by the generic cursor.

First of all create cursor image and save it with the extension .gif or .png (for Firefox, Chrome, Safari) and .cur for (for Internet Explorer). After that apply the cursor property with a comma-separated list of URLs pointing to these cursor images. Finally end this list with a generic cursor such as defaultpointerhelp, etc. as shown in the following example.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Custom Cursor</title>
<style>       
    a {
        cursor: url("/examples/images/custom.gif"), url("/examples/images/custom.cur"), default;
    }
</style>
</head>
<body>
	<p>Place your mouse pointer <a href="#">over me</a> to reveal the custom cursor.</p>
</body>
</html>

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

HTML / CSS Frequently Asked Questions

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
How to apply shadow effect on elements using CSS... >>
<< How to fix the issue of CSS collapsing parent havi...