js實現(xiàn)九宮格圖片半透明漸顯特效的方法
本文實例講述了js實現(xiàn)九宮格圖片半透明漸顯特效的方法。分享給大家供大家參考。具體實現(xiàn)方法如下:
<title>九宮格圖片半透明漸顯效果</title>
<body>
<STYLE type=text/css>.invisible {
FILTER: alpha(opacity=0)
}
</STYLE>
<SCRIPT language=JavaScript1.2>
<!--
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
which2.filters.alpha.opacity=0
}
function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
//-->
</SCRIPT>
<TABLE borderColor=#999999 cellSpacing=8 cellPadding=0 width=302
border=0><TBODY>
<TR>
<TD width=90 background=text1.gif bgColor=#db4d0e
height=90><A href=""><IMG
class=invisible onmouseover=high(this) onmouseout=low(this)
src="/images/m01.jpg" border=0 width=180px height=135px></A></TD>
<TD width=90 background=text2.gif bgColor=#ff9f07><A
href="/"><IMG
class=invisible onmouseover=high(this) onmouseout=low(this)
src="/images/m02.jpg" border=0 width=180px height=135px></A></TD>
<TD width=90 background=text3.gif bgColor=#ff9f07><A
href=""><IMG class=invisible
onmouseover=high(this) onmouseout=low(this) src="/images/m03.jpg"
border=0 width=180px height=135px></A></TD></TR>
<TR>
<TD background=text4.gif bgColor=#ff9f07><A
href="/"><IMG
class=invisible onmouseover=high(this) onmouseout=low(this)
src="/images/m04.jpg" border=0 width=180px height=135px></A></TD>
<TD background=text5.gif bgColor=#a5d523><A
href="/"><IMG
class=invisible onmouseover=high(this) onmouseout=low(this)
src="/images/m05.jpg" border=0 width=180px height=135px></A></TD>
<TD background=text6.gif bgColor=#c56e19><A
href="/"><IMG
class=invisible onmouseover=high(this) onmouseout=low(this)
src="/images/m06.jpg" border=0 width=180px height=135px></A></TD></TR>
<TR>
<TD background=text12.gif bgColor=#ff9f07><A
href="/"><IMG
class=invisible onmouseover=high(this) onmouseout=low(this)
src="/images/m07.jpg" border=0 width=180px height=135px></A></TD>
<TD background=text8.gif bgColor=#c56e19><A
href="/"><IMG
class=invisible onmouseover=high(this) onmouseout=low(this) src="/images/m08.jpg"
border=0 width=180px height=135px></A></TD>
<TD background=text7.gif bgColor=#c56e19><A
href="/"><IMG
class=invisible onmouseover=high(this) onmouseout=low(this)
src="/images/m09.jpg" border=0 width=180px height=135px></A></TD></TR></TBODY></TABLE>
</body>
</html>
希望本文所述對大家的javascript程序設(shè)計有所幫助。
相關(guān)文章
javascript檢測瀏覽器的縮放狀態(tài)實現(xiàn)代碼
這篇文章主要介紹了javascript檢測瀏覽器的縮放狀態(tài)實現(xiàn)代碼,需要的朋友可以參考下2014-09-09
一個字符串反轉(zhuǎn)函數(shù)可實現(xiàn)字符串倒序
這篇文章主要介紹了一個字符串反轉(zhuǎn)函數(shù)可實現(xiàn)字符串倒序,很簡單,但很實用,感興趣的朋友可以參考下2014-09-09
JavaScript數(shù)據(jù)結(jié)構(gòu)之優(yōu)先隊列與循環(huán)隊列實例詳解
這篇文章主要介紹了JavaScript數(shù)據(jù)結(jié)構(gòu)之優(yōu)先隊列與循環(huán)隊列,結(jié)合實例形式較為詳細(xì)的分析了javascrip數(shù)據(jù)結(jié)構(gòu)中優(yōu)先隊列與循環(huán)隊列的原理、定義與使用方法,需要的朋友可以參考下2017-10-10

