cuốn sách gpt4 ai đã làm

jquery - 片段 - 淡入然后淡出

In lại Tác giả: Walker 123 更新时间:2023-11-28 04:54:38 27 4
mua khóa gpt4 Nike

我想要一个自定义片段动画,以便它们淡入右/淡入左,然后在短暂延迟后淡出。假定所有片段都具有类 .visible.current-fragment。我以为我可以在短暂的延迟后删除类 .visible 并获得想要的结果。

事实并非如此。我的代码片段没有删除类(class)。阅读 .js 我看到他为每个元素添加了 .visible 类。

// Show all fragments
toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' .fragment' ) ).forEach( function( fragment ) {
fragment.classList.add( 'visible' );
} );

到目前为止,这是我的代码片段:

if ($(".slash__input").hasClass("fade-left") || element.hasClass("fade-right") ) {

$("slash__input").removeClass("visible");

setTimeout(function () {
console.log("working");
$('slash__input').removeClass("visible");
}, 5000);}

感谢您的回答。也许我走错了路,应该用 CSS 来做?

câu trả lời hay nhất

hiện hữu reveal.js documentation 中找到:

Multiple fragments can be applied to the same element sequentially by wrapping it, this will fade in the text on the first step and fade it back out on the second.



I'll fade in, then out

在构建自定义片段动画时,请注意 data-fragment-index="".

关于jquery - 片段 - 淡入然后淡出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40484109/

27 4 0
Walker 123
Hồ sơ

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá taxi Didi miễn phí
Phiếu giảm giá taxi Didi
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress