最新下载
24小时阅读排行榜
- 1 Excel如何快速删除表格中的重复数据_Excel删除重复项数据去重操作步骤
- 2 css transition与transform translateY垂直移动
- 3 JavaScript元编程深入解析
- 4 如何用css设置animation-delay延迟效果
- 5 sublime怎么配置eslint进行js语法检查_Sublime集成ESLint进行JavaScript语法检查配置
- 6 VSCode入门:基础配置与插件推荐
- 7 win11触摸屏校准功能在哪里_win11触摸屏校准功能使用教程
- 8 可米酷漫画在线入口网址_ 可米酷漫画官方免费链接
- 9 WPS为什么文件打开显示乱码_WPS乱码问题排查与解决
- 10 windows10提示“windows无法访问指定设备、路径或文件”_windows10无法访问文件或路径修复方法
- 11 VSCode代码镜头提供者配置
- 12 Bilibili青少年模式官网_Bilibili安全中心官方网站地址
- 13 如何用WPS制作数据对比分析表_WPS数据对比表制作步骤
- 14 Golang模块版本管理与升级策略解析
- 15 c++如何遍历和修改map中的value_c++修改map中value值方法
最新教程
-
- Node.js 教程
- 5693 2025-08-28
-
- CSS3 教程
- 827389 2025-08-27
-
- Rust 教程
- 8953 2025-08-27
-
- Vue 教程
- 10960 2025-08-22
-
- PostgreSQL 教程
- 8699 2025-08-21
-
- Git 教程
- 4631 2025-08-21
jQuery雪花缓慢飘落图标特效是一款html5雪花字体制作下雪天缓缓飘落各种雪花图标特效。
var fa = false;
//more layers and css blur will cause performance drop
var layer2 = new Layer(16, 6);
setInterval(layer2.addIcon, 150);
var layer1 = new Layer(32, 4);
setInterval(layer1.addIcon, 300);
function Layer(fontSize, speed){
this.addIcon = function(){
var random_icon = icons[Math.floor(Math.random()*icons.length)];
$random_x = Math.floor((Math.random() * 600) + 1);
if(fa){
var $icon = $('<i style="font-size:' + fontSize + 'px;" class="fa ' + random_icon + '" aria-hidden="true"></i>').appendTo(".scene");
}else{
var $icon = $('<i style="font-size:' + fontSize + 'px;" class="fa fa-snowflake-o" aria-hidden="true"></i>').appendTo(".scene");
}
//initial position
TweenLite.to($icon, 0, {x: $random_x, color: "#2222ff", y: -80});
//main animation
TweenLite.to($icon, speed, {color: "#ff00ff", y: 600, x: $random_x + (Math.random() * 400), opacity: 0, ease:Linear.easeNone, onComplete: deleteIcon, onCompleteParams: ["{self}"]});
//rotate animation
var rotation_speed = (Math.random() + 10);
TweenMax.to($icon, rotation_speed, {rotation: 390, ease:Linear.easeNone, repeat: -1});
};

