页脚代码html,博客园页脚 HTML 代码 .html
作者:互联网
style="position: fixed; left: 0px; top: 0px; z-index: 2147483647; pointer-events: none;">
var a_idx = 0;
jQuery(document).ready(function ($) {undefined
$("body").click(function (e) {undefined
var a = new Array(
"❤富强❤", "❤民主❤", "❤和谐❤", "❤文明❤",
"❤自由❤", "❤平等❤", "❤公正❤", "❤法治❤",
"❤爱国❤", "❤敬业❤", "❤诚信❤", "❤友善❤",
);
var $i = $("").text(a[a_idx]);
a_idx = (a_idx + 1) % a.length;
var x = e.pageX,
y = e.pageY;
$i.css({undefined
"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({undefined
"top": y - 180,
"opacity": 0
}, 1500,
function () {undefined
$i.remove();
});
});
});
(function ($) {undefined
$.fn.snow = function (options) {undefined
var $flake = $('
documentHeight = $(document).height(),
documentWidth = $(document).width(),
defaults = {undefined
minSize: 10,
maxSize: 20,
newOn: 1000,
flakeColor: "#AFDAEF" /* 此处可以定义雪花颜色,若要白色可以改为#FFFFFF */
},
options = $.extend({}, defaults, options);
var interval = setInterval(function () {undefined
var startPositionLeft = Math.random() * documentWidth - 100,
startOpacity = 0.5 + Math.random(),
sizeFlake = options.minSize + Math.random() * options.maxSize,
endPositionTop = documentHeight - 200,
endPositionLeft = startPositionLeft - 500 + Math.random() * 500,
durationFall = documentHeight * 10 + Math.random() * 5000;
$flake.clone().appendTo('body').css({undefined
left: startPositionLeft,
opacity: startOpacity,
'font-size': sizeFlake,
color: options.flakeColor
}).animate({undefined
top: endPositionTop,
left: endPositionLeft,
opacity: 0.2
}, durationFall, 'linear', function () {undefined
$(this).remove()
});
}, options.newOn);
};
})(jQuery);
$(function () {undefined
$.fn.snow({undefined
minSize: 5, /* 定义雪花最小尺寸 */
maxSize: 50,/* 定义雪花最大尺寸 */
newOn: 300 /* 定义密集程度,数字越小越密集 */
});
});
标签:function,undefined,页脚,代码,random,html,var,options,Math 来源: https://www.cnblogs.com/aixuexi666888/p/15509844.html