<!DOCTYPE html>
<!-- saved from url=(0067)http://www.mcake.com/activity/2015/christmas.html?clickpoint=banner -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="zh-CN">
<title>2015圣诞节 - MCAKE-一直都是巴黎的味道!!!</title>
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="cache-control" content="max-age=1800">
<script type="text/javascript" src="snow/jquery.min.js"></script>
<script type="text/javascript">
$(window).bind("load scroll resize", function () {
var _scrollTop = $(window).scrollTop();
if (_scrollTop >= 810) {
$('.icon_1').css({'display':'block'});
} else {
$('.icon_1').css({'display':'none'});
}
});
(function($){
$.fn.snow = function(options){
var $flake = $('<div class="snowbox"><img src="snow/snow.png" width="100%"/></div>'),
//documentHeight = $(document).height(),
documentHeight = 3375-50,
documentWidth = $(document).width() - 20,
defaults = {
minSize : 10,
maxSize : 20,
newOn : 1000,
flakeColor : "" /* 此处可以定义雪花颜色,若要白色可以改为#FFFFFF */
},
options = $.extend({}, defaults, options);
var interval= setInterval( function(){
var startPositionLeft = Math.random() * documentWidth,
startOpacity = 0.5 + Math.random(),
//startalpha = Math.random()*100,
sizeFlake = options.minSize + Math.random() * options.maxSize,
endPositionTop = documentHeight - 50,
endPositionLeft = startPositionLeft - 500 + Math.random() * 500,
durationFall = documentHeight * 10 + Math.random() * 5000;
$flake.clone().appendTo('body').css({
left: startPositionLeft,
//filter:alpha(opacity=startalpha);
//'font-size': sizeFlake,
width: sizeFlake,
height: sizeFlake
}).animate({
top: endPositionTop,
left: endPositionLeft
},durationFall,'linear',function(){
$(this).remove()
});
}, options.newOn);
};
})(jQuery);
$(function(){
$.fn.snow({
minSize: 10, /* 定义雪花最小尺寸 */
maxSize: 20,/* 定义雪花最大尺寸 */
newOn: 100 /* 定义密集程度,数字越小越密集 */
});
});
</script>
</head>
<body style="background:#666">
<link rel="stylesheet" type="text/css" href="snow/action-1.css">
</body></html>