开发者

How to create RollOver Effects in JS?

Ive seen buttons in html have RollOver effects but what else can you add t开发者_开发知识库his effect too ?


You can add a mouseover event handler to any element in a page. The important part is what you do once the event is fired.


Like zneak said in comments, pretty much anything. Set code in the onmouseover event of an HTML element.

A couple of elements can have rollover effects set through css pseudoclasses (for example, a:hover for an anchor tag), but it's limited and not 100% warranted across all browsers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜