课程/JavaScript/前端开发
Velocity.js实现弹出式相框
-
-
Tsukiis
2017-11-17
- 自定义动画函数
-
截图
0赞 · 0采集
-
-
web端
2017-07-13
- 自定义动画
-
截图
0赞 · 0采集
-
-
cyrus_0001
2016-05-17
- RegisterEffect和RegisterUI在表现上是一致的
-
0赞 · 0采集
-
-
cyrus_0001
2016-05-17
- 注意scaleX的大小写,以及RegisterEffect()方法的参数列表
-
0赞 · 0采集
-
-
慕码人6295517
2016-05-10
- 左右晃动
-
0赞 · 0采集
-
-
跟往事干杯
2016-04-18
- 作为一个动画框架,提供了很多自带的动画效果,也可以自己注册一些动画效果
-
0赞 · 0采集
-
-
跟往事干杯
2016-04-18
- 动画的执行先后问题,序列
-
0赞 · 0采集
-
-
蓝天的狂热
2015-12-03
- 使绑定的div在鼠标滑上去(mouseover)的时候产生shake(callout.shake是velocity的预定义动画,进官网查看更多预定义动画)的效果,$(this)是指目前绑定的div<br>
$('#id名称').on('mouseover',function(){<br>
$(this).velocity('callout.shake');<br>
})
自定义动画:
$.Velocity.RegisterEffect/RegisterUI('自定义动画名字',{
defaultDuration:300, //动画持续时间
calls:[
[{scaleX:1.1},0.5],
[{scaleX:1.0},0.5] //scaleX是指该元素在X轴方向的缩放比例,后面的0.5指占动画总时长的比例
]
});
再用
$('#id名称').on('mouseover',function(){<br>
$(this).velocity('自定义动画名字');<br>
})来实现动画的展现
-
0赞 · 2采集
-
-
qq_文兵
2015-12-03
- 注册自定义动画RegisterEffect==RegisterUI
-
截图
0赞 · 1采集
-
-
qq_文兵
2015-12-03
- 注意:在调用自定义动画的时候不需要callout
-
截图
0赞 · 1采集
-
-
qq_文兵
2015-12-03
- 官网的预定义动画,搜索pre-registered
-
截图
0赞 · 0采集
-
-
fengyang
2015-10-25
- $.Velocity.RegisterEffect("动画名",{
//动画时间
defaultDuration:300,
calls:[
//0.5表示占用=default时间的百分比
[{scaleX:1.1},0.5]
]
})
-
0赞 · 1采集
-
-
fengyang
2015-10-25
- // (function($){
// $("#box1").velocity({
// width:'300px',
// height:'300px'
// },{
// duration:1000,
// complete:function(){
// $("#box2").velocity({
// width:'300px',
// height:'300px'
// },{
// duration:1000,
// delay:1000 /*延时1s*/
// });
// }
// });
// })(jQuery);
(function($){
var seq=[
{
elements:$("#box1"),
properties:{width:'300px'},
options:{duration:1000}
},
{
elements:$("#box2"),
properties:{width:'300px'},
options:{duration:1000}
}
];
$.Velocity.RunSequence(seq);
})(jQuery);
-
0赞 · 0采集
-
-
大青山Z
2015-10-13
- $.Velocity.RegisterEffect('linxin.pulse',{
defaultDuration:300,
calls:{
[{scaleX:1.1},0.5],
[{scaleX:1.0},0.5],
[]
}
})
-
截图
0赞 · 1采集
-
-
大青山Z
2015-10-13
- 自定义 预定义动画
-
截图
0赞 · 0采集
-
-
大青山Z
2015-10-13
- $.Velocity.RunSequence(); 动画序列
-
0赞 · 0采集
-
-
i林斌
2015-09-02
- 123
-
截图
0赞 · 0采集
-
-
dosnnss
2015-09-01
- $.Velocity.RunSequence();
-
0赞 · 0采集
-
-
慕慕7437825
2015-08-20
- fff
-
0赞 · 0采集
-
-
qq_Ostrovsky_0
2015-08-20
- $.Velocity.RegisterEffect('linxin.pulse',{
defaultDuration:300,
calls:{
[{scaleX:1.1},0.5],
[{scaleX:1.0},0.5],
[]
}
})
-
0赞 · 0采集
-
-
慕田峪1819112
2015-08-16
- 很赞
-
截图
1赞 · 1采集
-
-
慕田峪1819112
2015-08-16
- 很赞
-
截图
0赞 · 0采集
-
-
努力的开发人员
2015-08-16
- pre-registered预定义动画
-
0赞 · 0采集
-
-
longming
2015-08-15
- RegisterEffect()跟RegisterUI基本一样
-
0赞 · 0采集
-
-
longming
2015-08-15
- $.Velocity.RegisterEffect("动画名",{
//动画时间
defaultDuration:300,
calls:[
//0.5表示占用=default时间的百分比
[{scaleX:1.1},0.5]
]
})
-
0赞 · 0采集
-
-
longming
2015-08-15
- 预定义动画
-
截图
0赞 · 0采集
-
-
墨西哥鸡味卷
2015-08-13
- $.Velocity.RegisterEffect('linxin.pulse',{
defaultDuration:300,
calls:{
[{scaleX:1.1},0.5],
[{scaleX:1.0},0.5],
[]
}
})
-
截图
0赞 · 2采集
-
-
墨西哥鸡味卷
2015-08-13
- velocity预定义动画。。。
-
截图
0赞 · 0采集