locked
How to hide the cursor on a canvas

    Question

  • Hi all,

    I'm using a canvas for drawing. I want to hide the cursor when the mouse move into the canvas area. So how can I hide it in JS code?

    Thanks.

    Dong

    Sunday, April 28, 2013 2:26 AM

Answers

  • Try styling the canvas with cursor: none in CSS, or in JavaScript do canvasElement.style.cursor = "none";. I believe that will work.
    • Marked as answer by wd0623 Sunday, April 28, 2013 6:05 AM
    Sunday, April 28, 2013 4:17 AM

All replies

  • Try styling the canvas with cursor: none in CSS, or in JavaScript do canvasElement.style.cursor = "none";. I believe that will work.
    • Marked as answer by wd0623 Sunday, April 28, 2013 6:05 AM
    Sunday, April 28, 2013 4:17 AM
  • Thanks for your quick reply!

    Best Regards.

    Sunday, April 28, 2013 6:05 AM