模糊和取消模糊效果以及悬停效果 css 和 javascript

发布于 2025-01-12 04:32:06 字数 442 浏览 6 评论 0原文

问题图像

当我将鼠标悬停在文本上时,我无法从背景。所以圆圈停止了,运动不顺畅。我需要根据需要移动圆圈,当鼠标悬停在文本上时,它将显示。

这是代码

https://github.com/safaa-alnabhan/blur-effcet?fbclid=IwAR0VJoVaeJhttWDgOeueFm-63a36pU866l7u9kMkYodbp6slAM-3XRUdIBM

image of the problem

when I hover on the text I can not get the x and y from the background. so the circle is stopped and the movement is not smooth. I need to move the circle as I want and when hovering on the text, it will display.

here is the code

https://github.com/safaa-alnabhan/blur-effcet?fbclid=IwAR0VJoVaeJhttWDgOeueFm-63a36pU866l7u9kMkYodbp6slAM-3XRUdIBM

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半衾梦 2025-01-19 04:32:06

让一切的“内容”父母变得更好。

或者

            d.addEventListener('mousemove',function(e){
            if(e.target && e.target.classList.contains("moveable") ){
              //moveable class of all elements
                  getCoOrdinates(e);
             }

         });

然后你需要取“内容”的 e 而不是“文本”

make "content" parent of all much better.

OR

            d.addEventListener('mousemove',function(e){
            if(e.target && e.target.classList.contains("moveable") ){
              //moveable class of all elements
                  getCoOrdinates(e);
             }

         });

and then you need to take e of the "content" not the "text "

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文