欢迎来到代码驿站!

JavaScript代码

当前位置:首页 > 网页前端 > JavaScript代码

js实现九宫格图片半透明渐显特效的方法

时间:2021-06-11 08:06:38|栏目:JavaScript代码|点击:

本文实例讲述了js实现九宫格图片半透明渐显特效的方法。分享给大家供大家参考。具体实现方法如下:

复制代码 代码如下:
<html>
<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程序设计有所帮助。

上一篇:localStorage的黑科技-js和css缓存机制

栏    目:JavaScript代码

下一篇:理解 JavaScript EventEmitter

本文标题:js实现九宫格图片半透明渐显特效的方法

本文地址:http://www.codeinn.net/misctech/139547.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有