1,css,js,img一个都不能少运行代码框
<style type="text/css"><!--.trans_img {filter:alpha(opacity=30,enabled=1) blendtrans(duration=1); border:0 solid black}--></style><script language=javascript> function transimg(obj,enable) { obj.filters.blendtrans.apply(); obj.filters[0].enabled=enable; obj.filters.blendtrans.play(); }</script><img src="/files/bpic/2006-6/3/066306055289672.gif" class="trans_img" onmouseover="transimg(this,0)" onmouseout="transimg(this,1)">
[ctrl+a 全部选择 提示:你可先修改部分代码,再按运行]2,js & img运行代码框
<script language="javascript"> nereidfadeobjects = new object();nereidfadetimers = new object();function nereidfade(object, destop, rate, delta){if (!document.all)return if (object != "[object]"){ file://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><a href="http://www.cnbruce.com/" target="_blank"><img border="0" src="/files/bpic/2006-6/3/066306055278937.gif" onmouseout=nereidfade(this,50,10,5) onmouseover=nereidfade(this,100,10,5) style="filter: alpha(opacity=50) " border=0></a>
[ctrl+a 全部选择 提示:你可先修改部分代码,再按运行]3,用htc文件,不用js从而减轻工作量。
下载alpha.htc: http://www.cnbruce.com/js/alpha.htc
效果页查看:http://www.cnbruce.com/js/a.html 4,有点flash的味道,一闪而过。运行代码框
<script language=javascript type=text/javascript>function trains(id,text){document.all[id].innerhtml=' '+text}function trainpic(id,text){document.all[id].innerhtml='<img alt=" 鼠标实现图片的渐有渐无 " src="/files/bpic/2006-6/3/066306055499683.gif">'}function high(which2){theobject=which2;theobject.filters.alpha.opacity=0highlighting=setinterval("highlightit(theobject)",50)}function low(which2){clearinterval(highlighting)which2.filters.alpha.opacity=100}function highlightit(cur2){if (cur2.filters.alpha.opacity<100)cur2.filters.alpha.opacity+=15else if(window.highting)clearinterval(highlighting)}</script><a href="http://www.cnbruce.com/"><img onmouseover="this.style.filter='alpha(opacity=100)';high(this)" onmouseout="low(this)" src="/files/bpic/2006-6/3/066306055289672.gif" border="0"></a>
[ctrl+a 全部选择 提示:你可先修改部分代码,再按运行]5,还有图片的“黑白转彩色”运行代码框
<script>function dotrans(filtercode) {imgobj.filters[0].apply();oimg.style.filter = filtercodeimgobj.filters[0].play();}</script><span id=imgobj onmouseleave='dotrans("gray")' style="filter: progid:dximagetransform.microsoft.fade(overlap=1.00); width: 1px" onmouseenter='dotrans("")'><img id=oimg style="filter: gray" src="/files/bpic/2006-6/3/066306055289672.gif"> </span>
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器