使用animate.css打开/关闭引导模态动画 [英] bootstrap modal animation open/close with animate.css

查看:340
本文介绍了使用animate.css打开/关闭引导模态动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请任何人可以帮助我,如何在引导程序模式打开和关闭时使用动画css样式进行动画处理? 在模态打开"中,应使用fadeIn效果打开它,而在模态打开"中,应使用fadeOut效果关闭它.

我想使用animate.css css样式表来动画化模态Poup的打开和关闭. 它应在打开模型时添加类fadeIn,而在关闭模态时应添加类fadeOut. (.fadeIn和.fadeOut类来自aniamte.css样式表)

解决方案

  $('.modal').on('show.bs.modal', function (e) {
     $('.modal .modal-dialog').attr('class', 'modal-dialog  fadeIn  animated');
  })
  $('.modal').on('hide.bs.modal', function (e) {
   $('.modal .modal-dialog').attr('class', 'modal-dialog  fadeOut  animated');
 })

这是我想要的.

Please anyone can help me, How can animate css styles can be use to animate while bootstrap modal opens and closes? As Modal Opens it should be open with fadeIn effect and while closing it should with fadeOut effect.

I wanted to use animate.css css stylesheet for animate modal poup open and close. It should add class fadeIn while opening Model and while closing the modal it should be adding class fadeOut. ( Class .fadeIn & .fadeOut are from aniamte.css stylesheet)

解决方案

  $('.modal').on('show.bs.modal', function (e) {
     $('.modal .modal-dialog').attr('class', 'modal-dialog  fadeIn  animated');
  })
  $('.modal').on('hide.bs.modal', function (e) {
   $('.modal .modal-dialog').attr('class', 'modal-dialog  fadeOut  animated');
 })

This is I wanted.

这篇关于使用animate.css打开/关闭引导模态动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆