ASP学校学生基地,原创基地,ASP优秀程序,定制程序,学校信息化教育整合系统的开始! 设为首页 添加到收藏夹 25175产品
  首页 > 网站技巧
        阅读新闻
 

随鼠标移动而变化的图片

[日期:2007-02-11]  来源:25175  作者:admin  阅读: 次  [字体: ]

随鼠标移动而变化的图片

<html>

<head>
<title>随鼠标移动而变化的图片 风越ASP代码生成器</title>powered by 25175.net
</head>

<body  onload=startthedots() >
<style type=text/css>#a0 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 24px; POSITION: absolute; TOP:
24px; WIDTH: 16px; Z-INDEX: 2000
}
#a1 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 96px; POSITION: absolute; TOP:
24px; WIDTH: 16px; Z-INDEX: 2000
}
#a2 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 132px; POSITION: absolute;
TOP: 24px; WIDTH: 16px; Z-INDEX: 2000
}
#a3 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 192px; POSITION: absolute;
TOP: 24px; WIDTH: 16px; Z-INDEX: 2000
}
#a4 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 240px; POSITION: absolute;
TOP: 24px; WIDTH: 16px; Z-INDEX: 2000
}
#a5 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 280px; POSITION: absolute;
TOP: 24px; WIDTH: 16px; Z-INDEX: 2000
}
#a6 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 24px; POSITION: absolute; TOP:
300px; WIDTH: 16px; Z-INDEX: 2000
}
#a7 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 200px; POSITION: absolute;
TOP: 300px; WIDTH: 16px; Z-INDEX: 2000
}
#a8 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 300px; POSITION: absolute;
TOP: 300px; WIDTH: 16px; Z-INDEX: 2000
}
#a9 {
CLIP: rect(0px 16px 16px 0px); HEIGHT: 16px; LEFT: 450px; POSITION: absolute;
TOP: 300px; WIDTH: 16px; Z-INDEX: 2000
}
#what {
LEFT: -96px; POSITION: absolute; TOP: 0px; VISIBILITY: hidden; Z-INDEX: 3000
}
</style>
<script language=JavaScript>
  window.onerror=null;
  netscape = (document.layers) ? 1:0;
  goodIE = (document.all) ? 1:0;
  //window.onResize="history.go(0); setup()";
  document.onmousemove=MoveHandler;
  var gotthere = 0;
  var count = 0;
  toplocation = new Array( 0,30,57,80,101,125,80,80,101,125,80,0 );
  temptoplocation = new Array( 50,100,100,150,150,200,200,100,150,150,200,200,0
  );
  leftlocation = new Array( 0,292,318,181,181,217,263,318,181,181,217,263,-96
  );
  templeftlocation = new Array( 0,0,260,390,420,550,680,390,420,550,680,0 );
  difftop = new Array( 0,0,0,0,0,0,0,0,0,0,0,0 );
  diffleft = new Array( 0,0,0,0,0,0,0,0,0,0,0,0 );
  questtop = -13;
  questleft2 = -96;
  if (netscape) {
  window.captureEvents(Event.MOUSEMOVE);
  window.onMouseMove = MoveHandler;
  var layerstart = "document.";
  var layerleft = ".left";
  var layertop = ".top";
  var layerstyle = "";
  var windowWidth = window.innerWidth;
  var windowHeight = window.innerHeight; }
  else if (goodIE) {
  layerstart = "document.all.";
  layerleft = ".left";
  layertop = ".top";
  layerstyle = ".style";
  windowWidth=600;
  windowHeight=400; }
  // end error trapping
  var Ypos2 = 72;
  var Xpos2 = 72;
  function MoveHandler(e) {
  if (netscape || goodIE) {
  Xpos2 = (netscape)?e.pageX:event.x
  Ypos2 = (netscape)?e.pageY:event.y
  Xorigin = Xpos2;
  Yorigin = Ypos2;
  if (Ypos2 > windowHeight/2) {
  if (Xpos2 > windowWidth/2) { direction = 1;}
  else { direction = -1;} }
  else {
  if (Xpos2 > windowWidth/2) { direction = -1;}
  else { direction = 1;} }
  }}
  amountup=44;
  function startthedots() {
  if (goodIE) {
  windowWidth=document.body.clientWidth;
  windowHeight=document.body.clientHeight; }
  markMe();
  eval(layerstart+"what"+layerstyle+layertop+" = windowHeight-amountup");
  eval(layerstart+"what"+layerstyle+".visibility = 'visible'");
  Xorigin = 204;
  Yorigin = 147;
  spin();run(); }
  var OrbitSize = 250;
  count=1; delay=100; direction = -1;
  var speed = 0.0628;
  var offset = 1;
  Count = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67 );
  PreCount = new Array ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 );
  Xcount = new Array()
  Ycount = new Array()
  for ( j = 0 ; j <= 300 ; j++ ) {
  Xcount[j] = Math.sin(j*speed);
  Ycount[j] = Math.cos(j*speed);
  }
  placeholder = 100;
  Xpoint = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67
  );
  Ypoint = new Array ( 0, .63, 1.26, 1.89, 2.52, 3.15, 3.78, 4.41, 5.04, 5.67
  );
  function spin() {
  if (direction) {
  placeholder++;
  if (placeholder > 199) { placeholder=100; }}
  else {
  placeholder--;
  if (placeholder < 100 ) { placeholder=199; }}
  for ( j = 0 ; j <= 9 ; j++ ) {
  Xpoint[j] = Xorigin + ( (OrbitSize*offset) * Xcount[placeholder+(j*10*direction)]
  );
  Ypoint[j] = Yorigin + ((OrbitSize * Ycount[placeholder+(j*10*direction)]) +
  dotsoff);
  }
  setTimeout('spin()',20);
  //window.status='Xorigin = '+Xorigin+' / Yorigin = '+Yorigin;
  }
  function run() {
  count++;
  for ( j = 0 ; j <= 9 ; j++ ) {
  difftop[j] = Ypoint[j] - temptoplocation[j];
  diffleft[j] = Xpoint[j] - templeftlocation[j];
  diff = 30;
  temptoplocation[j] = temptoplocation[j] + (difftop[j]/diff);
  templeftlocation[j] = templeftlocation[j] + diffleft[j]/diff;
  eval(layerstart+"a"+j+layerstyle+layerleft+" = templeftlocation["+j+"]");
  eval(layerstart+"a"+j+layerstyle+layertop+" = temptoplocation["+j+"]");
  }
  setTimeout('run()', 47) }
  goforit=1;
  function question0() {
  if (goforit) { goforit=0; question1(); }}
  function question1() {
  questleft2++;questleft2++;questleft2++;
  if (questleft2 <= 0) {
  eval(layerstart+"what"+layerstyle+layerleft+" = questleft2");
 
  setTimeout('question1()', 10); }
  else { setTimeout('question2()',1000);}
  }
  function question2() {
  questleft2--;questleft2--;questleft2--;
  if (questleft2 >= -96) {
  eval(layerstart+"what"+layerstyle+layerleft+" = questleft2");
 
  setTimeout('question2()', 10); }
  if (questleft2 == -96) { goforit=1; } }
  mark = 150; // milliseconds
  navDOM = window.innerHeight; // Nav DOM flag
  function markMe() {
  window.onresize=setup;
  markID = setInterval ("setup()",mark);
  }
  var dotsoff=0;
  function setup() {
  pagescroll=navDOM?pageYOffset:document.body.scrollTop
  eval(layerstart+"what"+layerstyle+layertop+" = windowHeight-amountup+pagescroll");
  if (!netscape) { dotsoff = pagescroll; }
  }
  //-- end script -->
  </script>
  </font>
  <div align=center id=a0><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a1><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a2><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a3><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a4><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a5><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a6><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a7><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a8><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=center id=a9><img height=16 src="../../../images/Refresh.GIF"
  width=16></div>
  <div align=left id=what></div>

</br></br>

<body>

</body>

</html>



推荐给朋友 】 【 打印此文章 】 【 加入收藏
 

上一篇:可移动的图层
下一篇:各类动态图片的集合

       相关新闻   图片  移动  鼠标 

       本文评论   所有评论
 
 

点评: 字数
姓名:

.
网站制作 | 广告服务 | 产品价格 | 汇款方式 | 购买指南 | 程序制作 |
技术支持 | idc.25175.net
Copyright © 2005-2008 25175. All Rights Reserved powered by 25175 | 浙ICP备05022281 | 法律顾问:陈淑丽