zoukankan      html  css  js  c++  java
  • JQuery在HTML中实现图片随鼠标移动而移动


    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>图片随鼠标移动</title>
        <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
        <script type="text/javascript">        
    $(function () {            
                $(document).mousemove(function (e) {
                    $("#divMouse").css("left", e.pageX).css("top",e.pageY);

                });
          });      
        </script>
    </head>
    <body>
    <div style=" 200px; float:left;"><marquee>文字自右往左移动</marquee></div>  
       <div id="divMouse" style="100px; height:100px; position:absolute">   
      <marquee>   
           <div style=" float:left; 50px; height:100px;">   
              <img src="images/*.jpg" style="50px; height:50px;" alt="" /></div>   
          <div style=" float:left; 50px; height:100px;">     
              <img src="images/*.jpg" style="50px; height:50px;" alt="" /></div>   
    </marquee>
    </div>
    </body>
    </html>

  • 相关阅读:
    事务隔离级别
    手机摄影之生活拍照技巧
    html.unescape(s)
    正则表达式编译和DOTALL小结
    重试模块==>retrying
    js逆向==>js2py
    mysql索引设计原则
    Django请求与响应
    Linux常用命令
    C++11 auto_ptr 的问题
  • 原文地址:https://www.cnblogs.com/Violety/p/Violety.html
Copyright © 2011-2022 走看看