
正文
jquery淡入,jquery淡入淡出方法
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
jquery淡入淡出的slow是多久
animate slow的时间是600ms
官方文档的解释是:
Duration
Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The default duration is 400milliseconds. The strings 'fast' and 'slow' can be supplied to indicate durations of 200 and 600 milliseconds, respectively.
引自:
相关问答
Q1: jquery中想让一个div中添加的东西fadeIn,淡入显示,在添加的时候淡入,就是append的时候fadeIn,怎么做
$('h1"+new Date()+"/h1').appendTo('#main').hide().fadeIn(200);
首先,我们要确定淡入的不是整个容器,而是加载的元素
其次,通过appendTo 加载出来,就已经显示在文档上,所以直接fadeIn效果不明显,
所以需要在加载后先.hide 隐藏一下,在淡入页面
Q2: 怎样用JavaScript制作淡入淡出的文字效果
1、用jquery的话,fadeIn ,fadeOut , fadeToggle
2、配合css3,用animation或transform变化 opacity 在 0~1间变换就行
3、用setTimeout或requestAnimationFrame 变换 opacity
Q3: jquery 在元素前插入内容,并且淡入,怎么写? 现在我的代码是: $(this).before('new ')
分解步骤,先插入元素,隐藏,渐入:
$(pnew /p).hide().insertBefore($(this)).fadeIn();





