Bootstrap 4 有多快 collapse动画片?我无法在困惑的 bootstrap.js
文件中找到它。
我的目标是以与默认 Bootstrap 折叠相同的速度向下滚动到未打包的 div 的底部。我使用 here 中的代码.
$("html, body").animate({scrollTop: $("#myID").scrollTop()}, 1000);
我想找到一个精确的值,而不是 1000
,它太小导致滚动速度很慢。
最佳答案
根据 animate()
上的 jQuery 文档:
Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The default duration is
400
milliseconds. The strings'fast'
and'slow'
can be supplied to indicate durations of200
and600
milliseconds, respectively.
您要查找的值应为 400
。
关于javascript - Bootstrap 4 - 折叠动画的速度是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52030655/