zoukankan      html  css  js  c++  java
  • 鼠标移动有尾巴

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8"/>
            <title>无标题文档</title>
            <link href="css/font-awesome.css" rel="stylesheet">
            <style type="text/css">
            div{10px; height:10px; position:absolute; top:0; left:0;}
            div::after{
                font-family: fontawesome; content:"f06c"; font-size: 18px; color:green;
            }
            </style>
            <script src="common.js"></script>
            <script type="text/javascript">
                onload = function(){
                    var list = document.getElementsByTagName("div");
                    list = toarray(list);
                    document.onmousemove = function(ev){
                        var e = ev || event;
                        var last = list.pop();
                        last.style.left = e.clientX + "px";
                        last.style.top = e.clientY + "px";
                        list.unshift(last);
                    }
                }
            </script>
        </head>
    <body>
        <div style="left: 341px; top: 172px;"></div>
        <div style="top: 172px; left: 341px;"></div>
        <div style="top: 69px; left: 272px;"></div>
        <div style="top: 69px; left: 272px;"></div>
        <div style="top: 69px; left: 272px;"></div>
        <div style="top: 75px; left: 275px;"></div>
        <div style="top: 77px; left: 278px;"></div>
        <div style="top: 81px; left: 281px;"></div>
        <div style="top: 83px; left: 284px;"></div>
        <div style="top: 86px; left: 291px;"></div>
        <div style="top: 86px; left: 299px;"></div>
    </body></html>
  • 相关阅读:
    MySQL数据库优化详解(收藏)
    怎么设置Linux swap分区?方法教程
    js获取IP地址多种方法实例教程
    JQuery设置获取下拉菜单选项的值 多实例
    JQuery中serialize()、serializeArray()和param()用法举例
    javascript 获取函数形参个数
    mysql SQLyog导入csv数据失败怎么办?
    今天离职了!
    Asp.Net Core 使用Quartz基于界面画接口管理做定时任务
    Asp.Net Core中使用Swagger,你不得不踩的坑
  • 原文地址:https://www.cnblogs.com/tis100204/p/10310009.html
Copyright © 2011-2022 走看看