博客园美化系列第四弹

<!--鼠标点击特效 -->
<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":0,
            "top":y,
            "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();});
    });
});
/*动态星系loading*/
</script>
<div id="loading">
    <div class="spinner-box">
        <div class="blue-orbit leo"></div>
        <div class="green-orbit leo"></div>
        <div class="red-orbit leo"></div>
        <div class="white-orbit w1 leo"></div>
        <div class="white-orbit w2 leo"></div>
        <div class="white-orbit w3 leo"></div>
    </div>
</div>
posted @ 2024-08-28 17:22  liukejie  阅读(9)  评论(0编辑  收藏  举报