javascript - Bootstrap 4 - 折叠动画的速度是多少?

标签 javascript jquery css twitter-bootstrap bootstrap-4

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 of 200 and 600 milliseconds, respectively.

您要查找的值应为 400

关于javascript - Bootstrap 4 - 折叠动画的速度是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52030655/

相关文章:

Javascript 创建帐户未链接到 Firebase 数据库

javascript - animationend 开始下一个函数,next functions animationend 开始两次

jquery - 使用 Yepnope 动态加载 CSS 有什么用处吗?

css - Ionic flexbox 可折叠菜单

javascript - 停止加载单击的链接,并让周围的元素使用 Angularjs ng-click 处理该操作

javascript - 尝试在 if 子句中将变量从 js 发布到 php

javascript - 将光标设置到 contenteditable div 的末尾

javascript - 获取 typeerror 函数不存在错误

html - 为什么 overflow-x 在 body 和 html 上隐藏 y 轴上的内容?

css - 如何修改搜索容器列文本的宽度?