gpt4 book ai didi

MooTools:淡出元素?

转载 作者:行者123 更新时间:2023-12-01 16:24:18 26 4
gpt4 key购买 nike

我有一个当前正在调用 .hide() 的 Element 对象。相反,我想将整个元素(及其子元素)的不透明度淡出到 100%(隐藏),作为可能超过 500 毫秒或 1000 毫秒的过渡效果。

Fx.Tween 可以用于此吗?这可能吗——MooTools 框架在它的 UI 库中有这样的效果吗?

最佳答案

 $('myElement').fade(0.7);

将元素不透明度设置为 70%。或者

$('myElement').fade('out'); // fades the element out.

http://mootools.net/docs/core/Fx/Fx.Tween#Element:fade

Element Method: fade
Element shortcut method for tween with opacity. Useful for fading an Element in and out or to a certain opacity level.

关于MooTools:淡出元素?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2034890/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com