简体   繁体   English

拖动桌面文档时更改鼠标 cursor

[英]Change mouse cursor when dragging a desktop document

so I'm kinda stuck, When dragging an outside element like a document or folder from my desktop, I cannot change its cursor. I ve already tried changing the cursor of the whole page and the body cursor, hover effects or active.所以我有点卡住了,当从我的桌面拖动外部元素(如文档或文件夹)时,我无法更改其 cursor。我已经尝试更改整个页面的 cursor 和正文 cursor、hover 效果或活动。 But it seems like when dragging a document from the desktop onto the web it is a completely different cursor not included in the web app.但似乎将文档从桌面拖到 web 上时,它是一个完全不同的 cursor,不包含在 web 应用程序中。

This is the result I would like to have: here这是我想要的结果: here

As you can see in the picture, I am dragging an image onto my web app and while hovering the console it changes the cursor to not allowed.正如您在图片中看到的,我正在将图像拖到我的 web 应用程序上,当悬停在控制台上时,它将 cursor 更改为不允许。

That's exactly my goal.这正是我的目标。

Has anyone suceeded in changing it?有没有人改过成功?

for adding functionality, yuo should code javascript.要添加功能,您应该编码 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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM