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.
精彩评论