用js实现一个砖头在页面,但鼠标点击拖动时,砖头在页面上形成拖拉效果:

刚开始时:

js实现一个砖头在页面拖拉效果

鼠标点击拖动后:

js实现一个砖头在页面拖拉效果

实现代码:

  

<html>
   <head>
       <meta charset="utf-8">
       <style type="text/css">
     *{
         margin:0px;
         padding:0px;
        }
    #zhuantou{
        width:120px;
        height:60px;
        background-image:url(1.jpg);
        position:fixed;
        left:100px;
         top:50px;
      }
      </style>
  <body>
      <div ;
        };
  </script>
 </body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-02-17
  • 2021-11-28
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
猜你喜欢
  • 1970-01-01
  • 2021-11-28
  • 2021-10-08
  • 2022-03-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案