当你使用javascript或jquery鼠标悬停时,如何使图像或按钮发光? [英] How do you make an image or button glow when you mouse over using javascript or jquery?

查看:164
本文介绍了当你使用javascript或jquery鼠标悬停时,如何使图像或按钮发光?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将鼠标悬停在按钮或图片上时,我想添加一个发光的效果。如何使用javascript,jquery或CSS?这是一个我想要的样子
http:/ / /www.flashuser.net/flash-menus/tutorial-flash-glow-buttons-menu.html



有人可以给我一些示例代码吗? / p>

提前感谢

解决方案

如果您不介意定位现代浏览器可以使用CSS转换和box-shadow属性,不需要JS。



在这里查看这个网站:

http://designshack.co.uk/articles/css/5-cool- css-hover-effects-you-can-copy-and-paste

(向下滚动,直到看到淡入和反射)



在此演示:
http://designshack.co.uk/tutorialexamples/HoverEffects/Ex5。 html


I want to add a glowing effect when I mouse over a button or image. How do I do this with javascript, jquery, or CSS? Here is an example of what I want it to look http://www.flashuser.net/flash-menus/tutorial-flash-glow-buttons-menu.html

Can someone give me some sample code?

Thanks in advance

解决方案

If you dont mind targeting modern browsers you can use CSS transitions and box-shadow properties, no JS needed.

Check out this site here:
http://designshack.co.uk/articles/css/5-cool-css-hover-effects-you-can-copy-and-paste
(Scroll down until you see Fade-in and Reflect)

Demo here: http://designshack.co.uk/tutorialexamples/HoverEffects/Ex5.html

这篇关于当你使用javascript或jquery鼠标悬停时,如何使图像或按钮发光?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆