zoukankan      html  css  js  c++  java
  • 彩色签名

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
        </head>
        <style type="text/css">
            .active{
                 10px;
                height: 10px;
                position: absolute;
                border-radius: 50%;
            }
        </style>
        <body>
        </body>
    </html>
    <script src="public.js">
    </script>
    <script>
        /*
        涉及的事件 :
        onmousedown
        onmousemove : 创建div 并设置div的位置 为鼠标当前位置
        onmouseup : 取消移动
         */
        document.onmousedown = function(e){
            e.preventDefault();
            document.onmousemove = function(e){
                var e = e || event;
                var oDiv = create("div");
                oDiv.className = "active";
                document.body.appendChild(oDiv);
                oDiv.style.backgroundColor = getColor();
                oDiv.style.left = e.pageX + "px";
                oDiv.style.top = e.pageY + "px";
            }
            document.onmouseup = function(){
                document.onmousemove = null;//取消移动
            }
            
            //return false;
        }
    </script>
  • 相关阅读:
    Servlet的生命周期及工作原理
    抓包---firebug
    firebug抓包
    token认证来龙去脉
    性能测试报告注意事项
    性能测试报告
    Error -26601解决办法
    lr新手误区
    css定位
    xpath定位
  • 原文地址:https://www.cnblogs.com/tis100204/p/10319180.html
Copyright © 2011-2022 走看看