zoukankan      html  css  js  c++  java
  • 悬浮球

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
       
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>无标题文档</title>
      <script type="text/javascript">
      function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
      var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
      if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
      }
       
      function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
      }
       
      function MM_findObj(n, d) { //v4.01
      var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
      d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
      }
       
      function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
      if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
      }
      </script>
      </head>
       
      <body onload="MM_preloadImages('XF/logo2.png')">
       
      <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 />
      <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 />
      <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 />
       
      <div draggable="true" style=" 300px; height:300px; border:0px solid black ; position: fixed; right:30px;top:42%"><!--大DIV-->
       
      <div id="zx" style=" 100px; height:100px; border-radius:50%; border:0px solid red; position: relative; margin:85px auto; z-index:99999999" onmouseout="yc()"><!--中心-->
      <img src="XF/logo.png" width="100%" height="100%" id="Image1" onmouseover="MM_swapImage('Image1','','XF/logo2.png',1)" onmouseout="MM_swapImgRestore()" onclick="dj()"/>
      </div>
      <div id="nr1" style=" 50px; height:50px; border-radius:50%; border:5px solid red ; position: relative; left:120px; bottom:110px; transition:0.75s;opacity:0;"><!--下-->
      <a href=""> <img src="XF/nr1.png" width="100%" height="100%" title="动态" /></a>
      </div>
      <div id="nr2" style=" 50px; height:50px; border-radius:50%; border:5px solid #0F0 ; position: relative; left:120px; bottom:270px; transition:0.75s;opacity:0;"><!--上-->
      <a href=""> <img src="XF/nr2.png" width="100%" height="100%" title="历史"/></a>
      </div>
      <div id="nr3" style=" 50px; height:50px; border-radius:50%; border:5px solid black ; position: relative; left:70px; bottom:280px; transition:0.75s;opacity:0;"><!--左-->
      <a href=""><img src="XF/nr3.png" width="100%" height="100%" title="角色"/></a>
      </div>
      <div id="nr4" style=" 50px; height:50px; border-radius:50%; border:5px solid pink ; position: relative; left:170px; bottom:340px; transition:0.75s;opacity:0;"><!--右-->
      <a href=""> <img src="XF/logo2.png" width="100%" height="100%" title="主页"/></a>
      </div>
       
       
       
       
       
       
      </div>
       
      </body>
      </html>
      <script type="text/javascript">
       
      var a=document.getElementById("nr1")
      var b=document.getElementById("nr2")
      var c=document.getElementById("nr3")
      var d=document.getElementById("nr4")
       
      function dj()
      {
      a.style.bottom="70px";
      a.style.opacity="9";
      window.setTimeout("dj0()",3000)
      b.style.bottom="310px";
      b.style.opacity="9";
      window.setTimeout("dj0()",3000)
      c.style.left="30px";
      c.style.opacity="9";
      window.setTimeout("dj0()",3000)
      d.style.left="210px";
      d.style.opacity="9";
      window.setTimeout("dj0()",3000)
      }
      function dj0()
      {
      a.style.bottom="110px";
      a.style.opacity="0";
      b.style.bottom="270px";
      b.style.opacity="0";
      c.style.left="70px";
      c.style.opacity="0";
      d.style.left="170px";
      d.style.opacity="0";
      }
       
       
      function yc()
      {
      var jl=document.getElementById("zx").style.right
      if(jl<="200px")
      {
      jl="0px";
      }
      else
      {
      jl="300px";
      }
      }
       
       
      </script>
  • 相关阅读:
    jQuery 简单滑动轮播图效果
    西工大:同学你好,回来挂科!
    【入门】产品经理零基础怎么入门?
    【考点】 HashMap,HashTable,CurrentHashMap,LinkedHashMap,TreeMap简述
    P图鬼才们集体上线!高校毕业照P图哪家强?
    【实战】怎样实现前端裁剪上传图片功能
    校招选产品经理岗?给你浇盆水
    战胜70%对手的校招开发岗简历是这个样子的
    两个人遇到熊,装死的和转身跑的,哪个能活下来
    第一份实习工作,我应该学到什么?
  • 原文地址:https://www.cnblogs.com/baimangguo/p/6062162.html
Copyright © 2011-2022 走看看