gpt4 book ai didi

jquery - JQuery .slideDown() 的替代方案

转载 作者:行者123 更新时间:2023-12-01 07:19:38 27 4
gpt4 key购买 nike

有已知的 jquery SlideDown() 替代方法吗?

我问的原因是我认为slideDown确实应该被命名为roll down,因为它是一种解开内容而不是实际向下滑动的内容。

这是我所说的效果的示例 - 将鼠标悬停在页面上的主要项目之一上(在 ie 中不起作用):Example slide down

理想情况下也需要在 IE 中工作,所以我猜这是比 js 更多的过渡,当每个人都在 ie10 上时这是可以的,可能需要一段时间!

最佳答案

通过更多代码,您可以使用 .animate()

引用号:http://api.jquery.com/animate/

一个小例子:

$(document).ready(function(){
$(element).toggle(function(){
$(this).animate({height:40},200);
},function(){
$(this).animate({height:10},200);
});
});

关于jquery - JQuery .slideDown() 的替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15203065/

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