JavaScript Cursor Change (and change back again)

前端 未结 7 1938
日久生厌
日久生厌 2021-01-17 11:14

I have this page that does some funky database stuff that takes a couple seconds to process, and in the meantime I\'d like to set a \"wait\" cursor so the user

7条回答
  •  悲&欢浪女
    2021-01-17 11:29

    Not an answer to the question, but a way of achieving what is wanted.

    Make a div (see class below) visible when you are loading.

    • ensures no element is accessible and dimmed display indicates this.
    • you can add an animated gif to indicate something is going on instead of the cursor.

      .loading{ position:fixed; height:100%; width:100%; left:0; top:0; cursor:wait; background:#000; opacity:.5; z-index:999}

提交回复
热议问题