zoukankan      html  css  js  c++  java
  • 侧边栏的分享到

      <!Doctype html>
      <html>
      <head>
      <meta charset="utf-8">
       
      <style>
      *{margin:0;padding:0;}
      #div{100px;height:300px;background:green;position:absolute;left:-100px;}
      #div span{height:70px;background:yellow;position:absolute;top:100px;left:100px;}
      </style>
      </head>
      <body>
      <div id="div">
      <span>分享到</span>
      </div>
      <script>
      var odiv=document.getElementById('div');
       
      odiv.onmouseover=function (){
      ss(10,0);
      }
      odiv.onmouseout=function(){
      ss(-10,-100);
      }
       
      var timer=null;
      function ss(aa,bb){
      //bb目标
      clearInterval(timer);
      timer=setInterval(function(){
      if(odiv.offsetLeft==bb){
      clearInterval(timer)
      }else{
      odiv.style.left=odiv.offsetLeft+aa+'px';
      }
       
      },33)
       
      }
       
      </script>
      </body>
      </html>
  • 相关阅读:
    SpringBoot入门
    Java自定义注解(1)
    git集成idea
    git常用命令
    Shiro授权
    shiro认证
    shiro入门
    SpringMVC文件上传
    SpringMVC入门
    mybatis关联关系映射
  • 原文地址:https://www.cnblogs.com/-qiang/p/5786306.html
Copyright © 2011-2022 走看看