发布于 1970-01-01 08:00
  • 3 个回答
    • // Safari 3.1 到 6.0 代码
      document.getElementById("myp").addEventListener("webkitTransitionEnd", myFunction);

      // 标准语法
      document.getElementById("myp").addEventListener("transitionend", myFunction);

      2022-11-25 07:04 回答
    • 如果你是在pc上使用的,我建议你可以使用velocity.js,但如果你用在移动端,我建议还是用原生css动画,本人在移动端首次使用velocity.js,还是略卡,换回css的比较流畅了,再强调,在移动端,优先用css动画而非js动画.
      velocity.js提供友好的回调Promises写法
      请参考一下2个链接

      http://julian.com/research/velocity/#uiPack
      http://julian.com/research/velocity/#promises
      网站:http://julian.com/research/velocity/
      
      2022-11-25 07:04 回答
    • 1.transition
      可以了解 transitionend 事件。
      W3C CSS Transitions Draft:http://www.w3.org/TR/css3-transitions...

      The ‘transitionend’ event occurs at the completion of the transition. In the case where a transition is removed before completion, such as if the transition-property is removed, then the event will not fire.

      Bubbles: Yes
      Cancelable: Yes
      Context Info: propertyName, elapsedTime

      demo在此。http://jsfiddle.net/QBFtH/1/

      2.animation动画
      可以了解 animationend 事件。
      W3C CSS Animation Events:http://www.w3.org/TR/css3-animations/...

      http://developer.apple.com/library/sa...

      The ‘animationend’ event occurs when the animation finishes.

      Bubbles: Yes
      Cancelable: No
      Context Info: animationName, elapsedTime

      demo:http://jsbin.com/oveval/10

      2022-11-25 07:04 回答
    撰写答案
    今天,你开发时遇到什么问题呢?
    立即提问
    PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
    Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有