Hiding the mouse cursor when idle using JavaScript

后端 未结 7 1823
灰色年华
灰色年华 2021-02-14 01:29

Is it possible to use JavaScript to set the cursor attribute to the property none if the mouse is inactive for a certain amount of time (say, five seco

7条回答
  •  走了就别回头了
    2021-02-14 02:21

    In CSS 2 none is not a valid value for the cursor property. It is valid in CSS 3, however.

    Otherwise you might be able to use a custom cursor loaded from a URI that is simply transparent.

    I would consider this to be highly distracting for the user, though, so I wouldn't advise you to actually do that.

提交回复
热议问题