jQuery 微光按钮效果

发布于 2024-10-07 04:32:02 字数 206 浏览 1 评论 0原文

有没有办法使用 jQuery 在 HTML 元素上创建闪烁效果,模拟移动光源?我在 Flash 组件上看到了这一点,但还没有在 jQuery 中看到过。如果可以的话,我想避免制作闪闪发光的 GIF。

EDIT1:我想我必须捕获悬停事件,然后使用 animate 将白色模糊对角图像堆叠在 IMG 或 DIV 标签边界的顶部,将其从左向右移动一次。

Is there a way to create a shimmer effect on an HTML element, using jQuery, simulating a moving lightsource? I see this on Flash components, but haven't seen one with jQuery yet. Want to avoid having to make shimmering GIFs if I can.

EDIT1: I imagine I'll have to capture the hover event and then use animate to stack a white fuzzy diagonal image on top of an IMG or DIV tag's boundaries, moving it from left to right once.

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

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

发布评论

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

评论(4

柠北森屋 2024-10-14 04:32:02

刚刚做了一个例子: http://www.jsfiddle.net/gaby/pZm2m/

是这与您正在寻找的类似吗?

它执行您提到的操作...对对角线半透明图像进行动画处理。

我使用了 http://plugins 中找到的 Background-Position-Animation 插件.jquery.com/project/backgroundPosition-Effect

Just made an example: http://www.jsfiddle.net/gaby/pZm2m/

is this similar to what you are looking for ?

It does what you mention .. animate a diagonal semi transparent image.

I used the Background-Position-Animation plugin found at http://plugins.jquery.com/project/backgroundPosition-Effect

迷爱 2024-10-14 04:32:02

这是一个带有 jQ​​uery 闪光效果的教程(帖子底部的演示链接):

http: //www.eu-live.com/?p=164

Here is a tutorial with a jQuery shimmer effect (demo link at the bottom of the post):

http://www.eu-live.com/?p=164

乜一 2024-10-14 04:32:02

我最近遇到了这个(不是我的代码),它看起来相当可行:

http://tedtoy.github.io /ShimmerJS/

I recently ran into this one (not my code) and it looks quite workable:

http://tedtoy.github.io/ShimmerJS/

复古式 2024-10-14 04:32:02

另一个机会是这个:

http://www.nealgrosskopf.com/tech/thread .php?pid=79

使用 CSS3,适用于最新的(2011+)Mozilla、Opera、Chrome、Safari,最终可能还有 IE。

Another opportunity is this one:

http://www.nealgrosskopf.com/tech/thread.php?pid=79

Uses CSS3 and works on recent (2011+) Mozilla, Opera, Chrome, Safari, and perhaps IE eventually.

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