CSS for grabbing cursors (drag & drop)

后端 未结 7 976
一整个雨季
一整个雨季 2020-11-30 20:05

I have a JavaScript webapp where the user needs to grab the background to move the whole screen around. So I want the cursor to change when they\'re hovering over the backg

相关标签:
7条回答
  • 2020-11-30 20:53

    I may be late, but you can try the following code, which worked for me for Drag and Drop.

    .dndclass{
        cursor: url('../images/grab1.png'), auto; 
    
    }
    
    .dndclass:active {
        cursor: url('../images/grabbing1.png'), auto;
    }
    

    You can use the images below in the URL above. Make sure it is a PNG transparent image. If not, download one from google.

    0 讨论(0)
提交回复
热议问题