0
任何方法来使着名的jQuery翻转!插件仅影响文本? ......看到文字实际旋转而不是消失,然后在“旋转”结束时重新出现?jQuery翻转!插件仅用于文本?
var $flipBox = $('span#flipbox'),
flip_opts = [{
direction: 'tb',
speed: 600,
content: "NUMBER TWO"
},
{
direction: 'tb',
speed: 600,
content: "NUMBER 3"
},
{
direction: 'tb',
speed: 600,
content: "NUMBA 4"
}
],
curr_indx = 0,
timer = setInterval(function() {
if (curr_indx >= flip_opts.length) {
curr_indx = 0;
}
$flipBox.flip(flip_opts[curr_indx]);
curr_indx++;
}, 3000);
小提琴:http://jsfiddle.net/Ws6sS/
它的设置由Ohgodwhy回答定时器
没有。仔细看看这是如何工作的。它添加一个具有相同尺寸/背景大小的新元素,然后将元素动画化为其自身并再次返回;那么它将删除它自己并显示下一个元素。 – Ohgodwhy
非常感谢您的解释。 – jakeed1