[英]Change mouse cursor when dragging a desktop document
所以我有点卡住了,当从我的桌面拖动外部元素(如文档或文件夹)时,我无法更改其 cursor。我已经尝试更改整个页面的 cursor 和正文 cursor、hover 效果或活动。 但似乎将文档从桌面拖到 web 上时,它是一个完全不同的 cursor,不包含在 web 应用程序中。
这是我想要的结果: here
正如您在图片中看到的,我正在将图像拖到我的 web 应用程序上,当悬停在控制台上时,它将 cursor 更改为不允许。
这正是我的目标。
有没有人改过成功?
要添加功能,您应该编码 javascript。
body{ cursor: no-drop; }.dropZone{ width: 50%; height: 300px; border: 1px solid #000; cursor: move; display: flex; align-items: center; justify-content: center; }
<div class="dropZone">zone</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.