[英]Boostrap remote modal: Delay animation until after loading
I am using Bootstrap v3.3.0 with remote loaded modals. 我正在将Bootstrap v3.3.0与远程加载的模态一起使用。 The remote modals are working fine, but I notice the fade effect is not as smooth as when a modal is pre-loaded with content instead of the remote loading that I am using. 远程模态可以正常工作,但是我注意到淡入淡出效果不如预加载了模态而不是我正在使用的远程加载时平滑。 The AJAX call is very small for all of my modals, so I don't want/need a loading indicator or progress bar, I would just like to delay the fade animation until after the content has been remotely loaded (which is never more than a fraction of a second). 对于我所有的模态来说,AJAX调用都非常小,因此我不需要/不需要加载指示器或进度条,我只想将淡入淡出动画延迟到远程加载内容之后(永远不会超过几分之一秒)。 Is there a way using javascript/jquery to specify the delaying of the fade-in animation until after the content has been loaded? 有没有一种方法可以使用javascript / jquery指定淡入动画的延迟,直到内容加载完毕为止? Thanks in advance. 提前致谢。
You can add a delay with pure CSS: 您可以使用纯CSS添加延迟:
.fade{
-webkit-transition-delay: .5s; // make this however long you need
transition-delay: .5s;
}
Also, if the vertical animation is a problem too, you can disable it with: 另外,如果垂直动画也是一个问题,则可以使用以下方式禁用它:
.modal.fade .modal-dialog {
-webkit-transform: none;
-o-transform: none;
transform: none;
} } }}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.