How to Change a Cursor Code

Cursor code is the HTML and CSS code that changes what a mouse pointer looks like when browsing a Web site. You can change the cursor code on a Web page so that when a user hovers or moves the mouse over part of your Web site, the mouse pointer changes from the regular arrow to something else.

Instructions

    • 1

      Open the HTML document for which you want to change the cursor code in a plain text editor or in the coding section of your Web developer application.

    • 2

      Locate the <head> section of your code and press "Enter" or "Return" to start a new line of code.

    • 3

      Type <style type="text/css"> and then press "Enter." Type .classa { cursor: xxx } and press "Enter." You can change "classa" to anything you want; this is the class name for your cursor.

    • 4

      Change the "xxx" to the type of cursor you want. Replace it with "help" if you want a question mark cursor. Replace it with "pointer" if you want a hand cursor. Replace it with "wait" if you want an hourglass cursor. Replace it with "crosshair" if you want a crosshair cursor. Replace it with "move" if you want a four-arrowed pointer cursor.

    • 5

      Type </style> to close the style tag.

    • 6

      Locate the <body> tags in your HTML document. Type <h1 class="classa">new cursor</h1>, replacing "classa" with the name for your style class. Whenever a user moves the mouse over "new cursor," the cursor will change to your specified cursor.

    • 7

      Save your HTML page.

Tips & Warnings

  • If you want to use an image as the cursor, change the cursor tag from { cursor: xxx } to { cursor:url(http://www.website.com/your/image/here.jpg),auto }, replacing the Web address with the location of your image file.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured