加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 带有Bootstrap 4的Angular UI模式

发布时间:2020-12-17 07:25:27 所属栏目:安全 来源:网络整理
导读:Bootstrap 3模态工作正常: https://jsfiddle.net/qLy7gk3f/4/ 但Bootstrap 4模态不会: https://jsfiddle.net/qLy7gk3f/3/ 代码完全相同: $scope.click = function() { $uibModal.open({ templateUrl: "modal.html",controller: "modal",scope: $scope });
Bootstrap 3模态工作正常:
https://jsfiddle.net/qLy7gk3f/4/

但Bootstrap 4模态不会:
https://jsfiddle.net/qLy7gk3f/3/

代码完全相同:

$scope.click = function() {
  $uibModal.open({
    templateUrl: "modal.html",controller: "modal",scope: $scope
  });
}

如何让AngularUI模态与Bootstrap 4一起使用?

我认为这只是添加.in类的一种情况,具体来说:
.fade.in {
    opacity: 1;
}

.modal.in .modal-dialog {
  -webkit-transform: translate(0,0);
       -o-transform: translate(0,0);
          transform: translate(0,0);
}

.modal-backdrop.in {
    filter: alpha(opacity=50);
    opacity: .5;
}

更新小提琴:
https://jsfiddle.net/qLy7gk3f/5/

或者您可以修改Bootstrap 4以使用show类:
https://github.com/angular-ui/bootstrap/issues/4234#issuecomment-285303515

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读