且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

svg 路径指针事件 - 单击检测

更新时间:2023-11-29 16:18:52

我遇到了类似的问题,我的路径的空白部分阻塞并阻止了其下方的 SVG 元素悬停,即使在路径不存在的部分.我通过为 fill CSS 属性指定 none 并删除了 fill-opacity 属性来解决它.所以试试这个,希望它会有所帮助.

I had a similar issue where the empty section of my path was blocking and preventing hover of SVG elements underneath it, even in the section where the path was not present. I resolved it by specifying none for the fill CSS attribute and also removed the fill-opacity attribute. So try this, hopefully it will help.