凭窗远眺 发表于 2007-12-20 23:18

模仿韩国GOOGLE的特效

模仿韩国GOOGLE的特效
<DIV class=t_msgfont id=postmessage_22084>演示地址:<A href="http://bbs.6co.cn/a/b/google.htm" target=_blank><FONT color=#800080>http://bbs.6co.cn/a/b/google.htm</FONT></A><BR><BR>把鼠标移到文字上即可看到效果!</DIV>
<DIV class=t_msgfont>代码在二楼!</DIV>

凭窗远眺 发表于 2007-12-20 23:19

&lt;!DOCTYPE HTML PUBLIC \\&quot;-//W3C//DTD HTML 4.01 Transitional//EN\\&quot;
\\&quot;http://www.w3.org/TR/html4/loose.dtd\\&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=\\&quot;Content-Type\\&quot; content=\\&quot;text/html;charset=gb2312\\&quot;&gt;
&lt;title&gt;测试效果&lt;/title&gt;
&lt;style type=\\&quot;text/css\\&quot;&gt;
&lt;!--
body {text-align:center}
table {border:1px solid #eeeeee;padding:3px 0;border-bottom-width:5px}
.icon td {width:50px;height:37px;background-image:url(http://bbs.6co.cn/a/b/svc_sprite_all.gif)}
.capt td {font:normal 11px verdana;padding:2px 0}
.a {background-position-y:0px}
.b {background-position-y:-37px}
.c {background-position-y:-74px}
.d {background-position-y:-111px}
.e {background-position-y:-148px}
.f {background-position-y:-185px}
.g {background-position-y:-222px}
.f1 {background-position-x:0px}
.f2 {background-position-x:-51px}
.f3 {background-position-x:-101px}
.f4 {background-position-x:-153px}
.f5 {background-position-x:-205px}
.f6 {background-position-x:-257px}
.f7 {background-position-x:-309px}
--&gt;
&lt;/style&gt;
&lt;script language=\\&quot;javascript\\&quot;&gt;
window.onload=function(){
   var t=document.getElementsByTagName(\'table\');
   var cs=t.rows.cells,ct=t.rows.cells;
   for(var i=0;i&lt;cs.length;i++)
   cssAni(cs,ct,7);
}
function cssAni(osrc,otarget,num,duration){
   ////////
   //IE only
   //by mozart0, 2007.06.09
   ////////
   var t=null,c=1,d=0,n=0,i=Math.floor((duration||300)/num);
   var s=otarget.className.replace(/.$/,\'\'),r=/over/;
   osrc.onmouseover=osrc.onmouseout=function(e){
   n=r.test((e||event).type)?1:-1;
   if(!t) t=setInterval(function(){
       if((c==1||c==num)&amp;&amp;((d==n||c+n&lt;1)||!(d=n)))
         return clearInterval(t),t=null;
       otarget.className=s+(c+=d);
   },i);
   };
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table&gt;
   &lt;tr class=\'icon\'&gt;
   &lt;td class=\'a f1\'&gt;&lt;/td&gt;
   &lt;td class=\'b f1\'&gt;&lt;/td&gt;
   &lt;td class=\'c f1\'&gt;&lt;/td&gt;
   &lt;td class=\'d f1\'&gt;&lt;/td&gt;
   &lt;td class=\'e f1\'&gt;&lt;/td&gt;
   &lt;td class=\'f f1\'&gt;&lt;/td&gt;
   &lt;td class=\'g f1\'&gt;&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr class=\'capt\'&gt;
   &lt;td&gt;&lt;a href=\'#;\'&gt;A&lt;/a&gt;&lt;/td&gt;
   &lt;td&gt;&lt;a href=\'#;\'&gt;B&lt;/a&gt;&lt;/td&gt;
   &lt;td&gt;&lt;a href=\'#;\'&gt;C&lt;/a&gt;&lt;/td&gt;
   &lt;td&gt;&lt;a href=\'#;\'&gt;D&lt;/a&gt;&lt;/td&gt;
   &lt;td&gt;&lt;a href=\'#;\'&gt;E&lt;/a&gt;&lt;/td&gt;
   &lt;td&gt;&lt;a href=\'#;\'&gt;F&lt;/a&gt;&lt;/td&gt;
   &lt;td&gt;&lt;a href=\'#;\'&gt;G&lt;/a&gt;&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;

叶飞 发表于 2007-12-21 00:42

这个可以用在做FLASH上的超连接按钮吗 ?

乔引娣 发表于 2008-8-13 15:36

<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=gb2312\"> <title>测试效果</title> <style type=\"text/css\"> <!-- body {text-align:center} table {border:1px solid #eeeeee;padding:3px 0;border-bottom-width:5px} .icon td {width:50px;height:37px;background-image:url(http://bbs.6co.cn/a/b/svc_sprite_all.gif)} .capt td {font:normal 11px verdana;padding:2px 0} .a {background-position-y:0px} .b {background-position-y:-37px} .c {background-position-y:-74px} .d {background-position-y:-111px} .e {background-position-y:-148px} .f {background-position-y:-185px} .g {background-position-y:-222px} .f1 {background-position-x:0px} .f2 {background-position-x:-51px} .f3 {background-position-x:-101px} .f4 {background-position-x:-153px} .f5 {background-position-x:-205px} .f6 {background-position-x:-257px} .f7 {background-position-x:-309px} --> </style> <script language=\"javascript\"> window.onload=function(){ var t=document.getElementsByTagName(\'table\'); var cs=t.rows.cells,ct=t.rows.cells; for(var i=0;i<cs.length;i++) cssAni(cs,ct,7); } function cssAni(osrc,otarget,num,duration){ //////// //IE only //by mozart0, 2007.06.09 //////// var t=null,c=1,d=0,n=0,i=Math.floor((duration||300)/num); var s=otarget.className.replace(/.$/,\'\'),r=/over/; osrc.onmouseover=osrc.onmouseout=function(e){ n=r.test((e||event).type)?1:-1; if(!t) t=setInterval(function(){ if((c==1||c==num)&&((d==n||c+n<1)||!(d=n))) return clearInterval(t),t=null; otarget.className=s+(c+=d); },i); }; } </script> </head> <body> <table> <tr class=\'icon\'> <td class=\'a f1\'></td> <td class=\'b f1\'></td> <td class=\'c f1\'></td> <td class=\'d f1\'></td> <td class=\'e f1\'></td> <td class=\'f f1\'></td> <td class=\'g f1\'></td> </tr> <tr class=\'capt\'> <td><a href=\'#;\'>A</a></td> <td><a href=\'#;\'>B</a></td> <td><a href=\'#;\'>C</a></td> <td><a href=\'#;\'>D</a></td> <td><a href=\'#;\'>E</a></td> <td><a href=\'#;\'>F</a></td> <td><a href=\'#;\'>G</a></td> </tr> </table> </body> </html>

醉卧美人膝 发表于 2008-9-2 16:37

已经失效了

lll 发表于 2008-9-2 18:46

試试看 谢謝

<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"> <html> <head> <meta http-equiv=\"Content-Type\" content=\"text/html;charset=gb2312\"> <title>测试效果</title> <style type=\"text/css\"> <!-- body {text-align:center} table {border:1px solid #eeeeee;padding:3px 0;border-bottom-width:5px} .icon td {width:50px;height:37px;background-image:url(http://bbs.6co.cn/a/b/svc_sprite_all.gif)} .capt td {font:normal 11px verdana;padding:2px 0} .a {background-position-y:0px} .b {background-position-y:-37px} .c {background-position-y:-74px} .d {background-position-y:-111px} .e {background-position-y:-148px} .f {background-position-y:-185px} .g {background-position-y:-222px} .f1 {background-position-x:0px} .f2 {background-position-x:-51px} .f3 {background-position-x:-101px} .f4 {background-position-x:-153px} .f5 {background-position-x:-205px} .f6 {background-position-x:-257px} .f7 {background-position-x:-309px} --> </style> <script language=\"javascript\"> window.onload=function(){ var t=document.getElementsByTagName(\'table\'); var cs=t.rows.cells,ct=t.rows.cells; for(var i=0;i<cs.length;i++) cssAni(cs,ct,7); } function cssAni(osrc,otarget,num,duration){ //////// //IE only //by mozart0, 2007.06.09 //////// var t=null,c=1,d=0,n=0,i=Math.floor((duration||300)/num); var s=otarget.className.replace(/.$/,\'\'),r=/over/; osrc.onmouseover=osrc.onmouseout=function(e){ n=r.test((e||event).type)?1:-1; if(!t) t=setInterval(function(){ if((c==1||c==num)&&((d==n||c+n<1)||!(d=n))) return clearInterval(t),t=null; otarget.className=s+(c+=d); },i); }; } </script> </head> <body> <table> <tr class=\'icon\'> <td class=\'a f1\'></td> <td class=\'b f1\'></td> <td class=\'c f1\'></td> <td class=\'d f1\'></td> <td class=\'e f1\'></td> <td class=\'f f1\'></td> <td class=\'g f1\'></td> </tr> <tr class=\'capt\'> <td><a href=\'#;\'>A</a></td> <td><a href=\'#;\'>B</a></td> <td><a href=\'#;\'>C</a></td> <td><a href=\'#;\'>D</a></td> <td><a href=\'#;\'>E</a></td> <td><a href=\'#;\'>F</a></td> <td><a href=\'#;\'>G</a></td> </tr> </table> </body> </html><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
页: [1]
查看完整版本: 模仿韩国GOOGLE的特效