Hide cursor in Chrome (and IE)

后端 未结 6 1872
南笙
南笙 2021-02-04 04:09

I have the following CSS that hides the mouse cursor for anything on the web page. It works perfectly in Firefox, but in IE and Chrome, it doesn\'t work.

html {
         


        
6条回答
  •  名媛妹妹
    2021-02-04 04:25

    So the best way to deal with this now is the pointer lock api.

    https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock

    It'll hide the mouse cursor, but give you access to the data about mouse movement as well.

提交回复
热议问题