Webkit-app-region: 拖拽和悬停不能同时工作

huangapple go评论80阅读模式
英文:

Webkit-app-region: drag and hover don't work together

问题

当构建Electron应用程序时,通过添加-webkit-app-region: drag;,可以看到一个元素可以拖动应用程序在桌面上移动,但是这个元素不会受到悬停、mouseenter、mouseleave等属性的影响...

我的目标是使用-webkit-app-region: drag;并在元素上放置悬停效果,这样当鼠标位于其上方时,除了可以拖动元素外,它还会显示不同的颜色。

英文:

When building an Electron app, by adding -webkit-app-region: drag; an element can be seen that it will drag the app around the desktop, but this element is exempt from properties such as hover, mouseenter, mouseleave, etc...

My goal is to use -webkit-app-region: drag; and place a hover over the element, that way when the mouse is on top, in addition to being able to drag the element, it will have a different color.

答案1

得分: 1

无法将HTML文档中的元素指定为Electron可拖动区域,并使该元素与诸如CSS悬停、JavaScript mouseenter或JavaScript mouseleave事件等属性具有互动性。

英文:

It is not possible to designate an element in a HTML document as an Electron draggable region and have the very same element interactive with properties such as css hover, js mouseenter or js mouseleave events.

huangapple
  • 本文由 发表于 2023年5月11日 02:27:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/76221574.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定