CSS / JS 來防止拖拽鬼影? - CSS /JS to prevent dragging of ghost image?

問題:

Is there a way to prevent the user from seeing a ghost of the image they are trying to drag (not concern about security of the images, but the experience).有沒有辦法防止用戶看到他們試圖拖動的圖像的幻影(不關心圖像的安全性,但關心的是體驗)。

I've tried this which fixes the problem with the blue selection on text and images but not the ghost image:我試過這個解決了文本和圖像上的藍色選擇的問題,但不是鬼圖像:

img {
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;
}

(I also tried nesting the image inside a div with the same rules applied to the div). (我還嘗試將圖像嵌套在 div 中,並將相同的規則應用於 div)。 Thanks謝謝


解決方案:

參考一: https://en.stackoom.com/question/VDEY
參考二: https://stackoom.com/question/VDEY
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章