【问题标题】:How many milliseconds do "slow", "normal", and "fast" represent in jQuery?“慢”、“正常”和“快”在 jQuery 中分别代表多少毫秒?
【发布时间】:2011-04-13 21:26:53
【问题描述】:

jQuery 允许在动画中使用字符串值“slow”、“normal”和“fast”(例如:$('#example').fadeOut('slow');)。这些值分别代表多少毫秒?

【问题讨论】:

  • 我不认为normal 是一个特殊的争论。但既然你提供了,除了 'slow' / 'flow' ,它被认为是 400。
  • @Jashwant - 无需做出无效假设。我确实研究了文档,除非在我提出这个问题后它们已经更新,否则没有提到毫秒值。
  • 我没找到你。我在哪里做出无效的假设? :O
  • 你说,“它应该 -1 没有研究。”但我做了研究。
  • 我删除了那个:) 我只是说我的想法。

标签: jquery animation effects jquery-effects


【解决方案1】:

600、400 和 200 分别为“慢”、“正常”、“快”。 All in the docs

【讨论】:

  • 谢谢,里面没看到。感谢参考!
  • 补充一下,normal 没有什么特别之处,比如slowfast。来自同一链接,If any other string is supplied, or if the duration parameter is omitted, the default duration of 400 milliseconds is used
【解决方案2】:

分别为 600ms、400ms 和 200ms。

Source

【讨论】:

  • 感谢您添加链接。不幸的是,它只说明了速度的快慢,并不正常。
  • 其实分别是600、400、200 =)
  • @Matt Huggins,我认为“正常”是默认值,即 400。您可以自己查看源代码 (code.jquery.com/jquery-1.4.2.js) 第 5885 行。
  • 如果我记得,文档只指定慢速和快速,任何其他值返回 400。因此,.fadeOut('monkeyFeces') 将在 400 毫秒时淡出。 (试试看)
【解决方案3】:

我会是原创的,分别回答 600、400、200。因为更高的毫秒数意味着更慢的速度 =) All in the source

【讨论】:

    猜你喜欢
    • 2012-03-20
    • 1970-01-01
    • 2012-06-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-08
    • 2013-07-11
    相关资源
    最近更新 更多