⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 510.html

📁 关于jsp的一些好文章 主要介绍一些关于JSP的应用技巧方面的东西
💻 HTML
字号:

<STYLE type=text/css>
<!--
body,td { font-size:9pt;}
hr { color: #000000; height: 1px}
-->
</STYLE>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD><TITLE>论坛精华 >> javascript小栈 >> 让主页上的文字飞舞</title>
</head>
<body >

<p><IMG SRC="../image/jsp001_middle_logo.gif" WIDTH="180" HEIGHT="60" BORDER=0 ALT=""></p>

<table width=100% bgcolor="#cccccc" align=center cellpadding="2" cellspacing="0" border=1 bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr bgcolor="#EFF8FF"><td>
<a href=http://www.jsp001.com/list_thread.php?int_attribute=4>论坛精华</a>
>> <a href=http://www.jsp001.com/list_thread.php?forumid=46&int_attribute=4>javascript小栈</a>
>> 让主页上的文字飞舞 [<a href=http://www.jsp001.com/forum/showthread.php?goto=newpost&threadid=510>查看别人的评论</a>]<br>

<hr><p>由 amtd 发布于: 2001-02-20 09:30</p><p><img src="images/icons/icon1.gif" alt="Post" border=0> </p><p>让主页上的文字飞舞<br><br><br><br><br>  动态主页是每一个拥有自己主页的页面制作人员的梦想。下面我们为您介绍的文章,带来的是让您主页上的文字飞舞起来的特效方法。 <br><br>  现在动态主页大行其道,很多朋友都想在自己的主页里加入一些新奇的效果,我们这里说的是一个通过 JavaScript 实现的跟随光标的文字飞舞。浏览的效果是光标在页面不动时,光标指向右边一行不动的文字,此段文字就是会飞的,具体内容根据个人喜好了。 <br><br>  当光标移动的时候,第一个字开始沿光标移动的位置再次靠近光标,依次第二个字,第三个字,有一定的延时性,所以看起来就有波浪的感觉,非常的酷!而且对于页中其他元素无任何影响,当其处于编辑状态它是不显示的,就和一个空白页一样,可进行正常的编辑。区别于有些动态效果,作为 Object 在编辑状态占一定空间,而在浏览状态则是动态改变的,所以会对正常编写的元素定位造成一些影响! <br><br>  我将其中的所有代码列出,各位只需把飞舞的文字改成自己的就成,而对于其他代码则不要做任何修改。这些飞舞的文字在编辑状态是不出现的,怎么样?够体贴吧!好,赶紧开始吧, 全部源代码如下 : <br><br>  〈html〉 <br><br>  〈head〉 <br><br>  〈title〉The Fly Font!〈/title〉 <br><br>  〈meta http-equiv=″Content-Type″ content=″text/html; charset=gb2312″〉 <br><br>  〈style〉 <br><br>  .spanstyle { <br><br>position:absolute; <br><br>visibility:visible; <br><br>top:-50px; <br><br>font-size:10pt; <br><br>font-family:Verdana; <br><br>font-weight:bold; <br><br>color:black; <br><br>  } <br><br>  〈/style〉 <br><br>  〈script〉 <br><br>  /* <br><br>  Cursor Trailor Text- By only <br><br>  */ <br><br>  var x,y <br><br>  var step=10 <br><br>  var flag=0 <br><br>  // Your snappy message. Important: the space at the end of the sentence!!! <br><br>  var message=″ ONLY ART-aBoUt DeSiGn ″ <br><br>  message=message.split(″ ″) <br><br>  var xpos=new Array() <br><br>  for (i=0;i〈=message.length-1;i++) { <br><br>xpos[i]=-50 <br><br>  } <br><br>  var ypos=new Array() <br><br>  for (i=0;i〈=message.length-1;i++) { <br><br>ypos[i]=-50 <br><br>  } <br><br>  function handlerMM(e){ <br><br>x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX <br><br>y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY <br><br>flag=1 <br><br>  } <br><br>  function makesnake() { <br><br>if (flag==1 && document.all) { <br><br>   for (i=message.length-1; i〉=1; i--) { <br><br>xpos[i]=xpos[i-1]+step <br><br>ypos[i]=ypos[i-1] <br><br>   } <br><br>xpos[0]=x+step <br><br>ypos[0]=y <br><br>for (i=0; i〈message.length-1; i++) { <br><br>   var thisspan = eval(″span″+(i)+″.style″) <br><br>   thisspan.posLeft=xpos[i] <br><br>thisspan.posTop=ypos[i] <br><br>   } <br><br>} <br><br>else if (flag==1 && document.layers) { <br><br>   for (i=message.length-1; i〉=1; i--) { <br><br>xpos[i]=xpos[i-1]+step <br><br>  ypos[i]=ypos[i-1] <br><br>   } <br><br>xpos[0]=x+step <br><br>ypos[0]=y <br><br>for (i=0; i〈message.length-1; i++) { <br><br>   var thisspan = eval(″document.span″+i) <br><br>   thisspan.left=xpos[i] <br><br>thisspan.top=ypos[i] <br><br>   } <br><br>} <br><br>var timer=setTimeout(″makesnake()″,30) <br><br>  } <br><br>  〈/script〉 <br><br>  〈SCRIPT LANGUAGE=″JavaScript″〉 <br><br>  〈!-- <br><br>  function launch(newURL, newName, newFeatures, orgName) { <br><br>   var remote = open(newURL, newName, newFeatures); <br><br>   if (remote.opener == null) <br><br>    remote.opener = window; <br><br>   remote.opener.name = orgName; <br><br>   return remote; <br><br>  } <br><br>  function launchRemote() { <br><br>   myRemote = launch(″flash/start.html″, ″myRemote″, ″height=380,width=572,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0″,titlebar=1, ″myWindow″); <br><br>  } <br><br>  // --〉 <br><br>  〈/SCRIPT〉 <br><br>  〈/HEAD〉 <br><br>  〈body onLoad=″makesnake()″ style=″width:100%;overflow-x:hidden;overflow-y:scroll″ bgcolor=″#FFFFFF″〉 <br><br>  〈script language=″ ″〉 <br><br>  〈!-- Beginning of JavaScript - <br><br>  for (i=0;i〈=message.length-1;i++) { <br><br>  document.write(″〈span id=′span″+i+″′ class=′spanstyle′〉″) <br><br>document.write(message[i]) <br><br>  document.write(″〈/span〉″) <br><br>  } <br><br>  if (document.layers){ <br><br>document.captureEvents(Event.MOUSEMOVE); <br><br>  } <br><br>  document.onmousemove = handlerMM; <br><br>  // - End of JavaScript - --〉 <br><br>  〈/script〉 <br><br>  〈/body〉 <br><br>  〈/html〉 <br><br>  你只需要将这些代码拷贝下来,然后保存为*.htm 或 *.html 就可以了。注意代码的第27行 var message=″ ONLY ART - aBoUt DeSiGn ″ 里面 ONLY ART - aBoUt DeSiGn就是我的宣传文字,把它改成你想显示的文字就成,还支持中文呢,是不是很棒? <br><br><br><br><br>(作者:小王 2000年03月16日 15:49)<br>__________________<br><font color=red>真实源于生活! </font><br>请访问我们的网站: <br>(VB爱好者乐园) <br><a href="http://www.vbgood.com" target=_blank>http://www.vbgood.com</a><br><a href="http://www.d1vb.com" target=_blank>http://www.d1vb.com</a><br><a href="http://61.128.97.225/vbgood/index.asp" target=_blank>http://61.128.97.225/vbgood/index.asp</a><br>拥有1800多个资料! </p></td>
  </tr>
</table>

<p>
<CENTER><a href="http://www.jsp001.com/forum/newreply.php?action=newreply&threadid=510">点这里对该文章发表评论</a></CENTER>
<p>该文章总得分是 <font color=red>0</font> 分,你认为它对你有帮助吗?
				[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=510&intVote=4","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>非常多</a>](<font color=red>0</font>) 
				[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=510&intVote=2","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>有一些</a>](<font color=red>0</font>) 
				[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=510&intVote=1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>无帮助</a>](<font color=red>0</font>) 
				[<a href=javascript:void(0) onclick=window.open("http://www.jsp001.com/forum/codeVote.php?threadid=510&intVote=-1","","menubar=no,toolbar=no,location=no,directories=no,status=no,resizable=no,scrollbars=no,width=70,height=40,top=0,left=0")>是灌水</a>](<font color=red>0</font>) </p>
<script language="javascript" src="http://www.jsp001.com/include/read_thread_script.php?threadid=510"></script>
<p><CENTER>
Copyright &copy; 2001 - 2009 JSP001.com . All Rights Reserved <P>

<IMG SRC="../image/jsp001_small_logo.gif" WIDTH="85" HEIGHT="30" BORDER=0 ALT="">
</CENTER></p>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -