マウスポインターを載せると画像が明るくなる

| サンプル |
| <head> <title></title> <SCRIPT language="JavaScript1.2"> <!--// function hilight(mouse){ if (mouse.filters.alpha.opacity<100) mouse.filters.alpha.opacity+=10 else if (window.highimag) clearInterval(highimag) } function high(img){ object=img highimag=setInterval("hilight(object)",100) } function low(img){ clearInterval(highimag) img.filters.alpha.opacity=50 } //--> </SCRIPT> </head> <body> <img src= ../art/p1b.gif border=0 width=100 height=100 style="filter:alpha(opacity=50)" onMouseOver="high(this)" onMouseOut="low(this)"> </body> |
| 上の『 img.filters.alpha.opacity=50』は、ポインターがはずれた時に表示する明るさで 下側の『filter:alpha(opacity=50)』は、初期値です。 適当に変更してみれば分かります。してみれば分かります。 ちなみに私が作成したものではありません。 画像なので当然ですがリンクもはれます。 |
ソースを利用したら、http://www.act2cool.com/html/へリンクの協力を御願い致します。