web299.com
全部
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
首页
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
当前位置:
首页
>
网页特效
>
动画效果
可创建gooey效果抖动窗口的jquery插件
分类:
动画效果
日期:
2024-05-14
点击(0)
评论(0)
演 示
免费下载
简介
在页面中引入jquery和jquery.wobblewindow.min.js文件。 ```html ``` ##### HTML结构 为要制作抖动窗口效果的HTML元素设置下面的HTML结构: ```html
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ac elementum tortor, eget efficitur quam.
``` ##### CSS样式 为抖动窗口元素设置下面的CSS样式: ```html #window { width:350px; height:350px; left:65px; top:65px; position:absolute; padding: 50px 50px 50px 50px; pointer-events: none; } ``` ##### 初始化插件 在页面DOM元素加载完毕之后,通过wobbleWindow()方法来初始化该插件。 ```html $( '#window' ).wobbleWindow(); ``` 也可以使用纯js的方法来调用插件: ```html var wobbleWindow = new WobbleWindow( document.getElementById( 'window' ) ); //带配置参数 var wobbleWindow = new WobbleWindow( document.getElementById( 'window' ), settings ); ``` ##### 配置参数 该抖动窗口效果插件的可用配置参数如下: ```html var settings = { name: 'window_1',//name depth: 1,//depth for zIndex offsetX: 0,//+ or - value the size of the div offsetY: 0,//+ or - value the size of the div moveTypeIn: 'move',//method points follow the mouse moveTypeOut: 'wobble',//method points go back to init position wobbleFactor: 0.9,//control the wobble effect wobbleSpeed: 0.1,//control the wobble speed moveSpeed: 3,//control the move speed lineWidth: 1,//lineWidth lineColor: '',//no value = no line or hex values bodyColor: '#FFF',//no value = no body color or hex values numberOfXPoints: 7,//quantity of points horizontal. must be an odd int numberOfYPoints: 5,//quantity of points vertical. must be an odd int movementLeft: true,//if true the points at the left can be moved movementRight: true,//if true the points at the right can be moved movementTop: true,//if true the points at the top can be moved movementBottom: true,//if true the points at the bottom can be moved debug: false//if true debug mode is on }; $( '#window' ).wobbleWindow( settings ); ```
相关推荐
html5浪漫粒子表白文字特效
SlidesJS幻灯片特效
html5瀑布流相册特效
css3 svg实现的情人节表白鲜花动画特效
t-scroll.js基于ES6的DOM元素,过渡动画库插件
纯js写省市区三级联动效果
广告
广告