简体   繁体   English

UIB模式背景不淡入

[英]UIB Modal Backdrop Not Fading In

I am using an angular-ui Modal. 我正在使用angular-ui模式。 When I close the modal, the modal box fades out and up and the backdrop fades out. 当我关闭模态时,模态框逐渐淡出,背景逐渐淡出。 This is desired behavior. 这是期望的行为。

However when I open the modal, although the modal box fades in and down, the backdrop just appears without fading in. I can't determine why. 但是,当我打开模态时,尽管模态框会逐渐变暗,但背景只会出现而不会淡入。我无法确定原因。

This is the code to open the modal: 这是打开模式的代码:

$scope.update_onclick = function() {

    $rootScope.modalInstance = $uibModal.open({
        templateUrl: 'webapp/packagetracker/update.html',
        controller: 'PackageTrackerController',
        backdrop: 'static'        
    });

};

This is the backdrop DIV from Chrome's developer tools when the modal is open 这是打开模式后来自Chrome开发人员工具的DIV背景

<div uib-modal-backdrop="modal-backdrop" class="modal-backdrop fade ng-scope in" ng-style="{'z-index': 1040 + (index &amp;&amp; 1 || 0) + index*10}" uib-modal-animation-class="fade" modal-in-class="in" modal-animation="true" data-bootstrap-modal-aria-hidden-count="1" aria-hidden="true" style="z-index: 1040;"></div>

I'm using angularjs 1.4.8, angular-animate 1.4.8 and ui-bootstrap-tpls-2.5.0. 我正在使用angularjs 1.4.8,angular-animate 1.4.8和ui-bootstrap-tpls-2.5.0。 The script tags to add these files are in that order. 添加这些文件的脚本标签按该顺序排列。

Any help would be appreciated. 任何帮助,将不胜感激。

看来这是模态的默认行为,因为您描述的行为在UI Bootstrap模态演示中已重复: https ://angular-ui.github.io/bootstrap/#! #modal

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM