• 博客园-点击鼠标爱心


    首页:
    <script type="text/javascript"> var a_idx = 0; jQuery(document).ready(function($) { $("body").click(function(e) { var a = new Array("","","","","","","","","","","",""); var $i = $("<span></span>").text(a[a_idx]); a_idx = (a_idx + 1) % a.length; var x = e.pageX, y = e.pageY; $i.css({ "z-index": 999999999999999999999999999999999999999999999999999999999999999999999, "top": y - 20, "left": x, "position": "absolute", "font-weight": "bold", "color": "rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")" }); $("body").append($i); $i.animate({ "top": y - 180, "opacity": 0 }, 1500, function() { $i.remove(); }); }); }); </script>
  • 相关阅读:
    git 常用命令速查表
    Git常用命令备忘
    display:inline-block
    JS 封装的结构关系
    IE6,7,8 CSS HACK
    JS 观察者模式
    JS 数组迭代方法
    JS 单例模式
    JS Closure 闭包
    Currying and Uncurrying Js
  • 原文地址:https://www.cnblogs.com/wjlovezzd/p/13304971.html
Copyright © 2020-2023  润新知