A form color gradient effect JS script effect that imitates the transparent gradient of images

Source: Internet
Author: User

<HTML>
<Head>
<Title> dancepower.cn </title>
<Script language = JavaScript>
// Flash table extension for dreamwever, by Dio (diopex@sina.com)
Nereidfadeobjects = new object ();
Nereidfadetimers = new object ();
Function nereidfade (object, destop, rate, Delta ){
If (! Document. All)
Return
If (object! = "[Object]") {// do this so I can take a string too
SetTimeout ("nereidfade (" + Object + "," + destop + "," + rate + "," + Delta + ")", 0 );
Return;
}
Cleartimeout (nereidfadetimers [object. sourceindex]);
Diff = destOp-object.filters.alpha.opacity;
Direction = 1;
If (object. Filters. Alpha. Opacity> destop ){
Direction =-1;
}
Delta = math. Min (Direction * diff, Delta );
Object. Filters. Alpha. Opacity + = direction * delta;
If (object. Filters. Alpha. Opacity! = Destop ){
Nereidfadeobjects [object. sourceindex] = object;
Nereidfadetimers [object. sourceindex] = setTimeout ("nereidfade (nereidfadeobjects [" + object. sourceindex + "]," + destop + "," + rate + "," + Delta + ")", rate );
}
}
</SCRIPT>
</Head>
<Body text = #000000 bgcolor = # ffffff leftmargin = 0 topmargin = 0 marginheight = "0"
Marginwidth = "0">
<Table Height = "100%" cellspacing = 0 cellpadding = 0 width = "100%" border = 0>
<Tbody>
<Tr>
<TD align = center>
<Table bordercolor = # ffffffff Height = 100 cellspacing = 1 cellpadding = 1
Width = 100 align = center bgcolor = #000033 border = 1>
<Tbody>
<Tr align = center>
<TD onmouseover = nereidfade (this, 100,10, 5)
Style = "filter: alpha (opacity = 70)" onmouseout = nereidfade (this, 50, 10, 5)
Bgcolor = #00 CCFF> <font face = verdana color = # ffffff
Size = 1> Dio </font> </TD>
<TD onmouseover = nereidfade (this, 100,10, 5)
Style = "filter: alpha (opacity = 70)" onmouseout = nereidfade (this, 50, 10, 5)
Bgcolor = # ff9900> <font face = verdana color = # ffffff
Size = 1> PEX </font> </TD> </tr>
<Tr align = center>
<TD onmouseover = nereidfade (this, 100,10, 5)
Style = "filter: alpha (opacity = 70)" onmouseout = nereidfade (this, 50, 10, 5)
Bgcolor = # ff3399> <font face = verdana color = # ffffff
Size = 1> PEX </font> </TD>
<TD onmouseover = nereidfade (this, 100,10, 5)
Style = "filter: alpha (opacity = 70)" onmouseout = nereidfade (this, 50, 10, 5)
Bgcolor = #33ff66> <font face = verdana color = # ffffff
Size = 1> Dio </font> </TD> </tr> </tbody> </table> </body>

PS: It was transferred from someone else. I thought it was very beautiful. So I took it and studied it well!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.