带有 Bootstrap 4 的 Angular UI 模式 [英] Angular UI modal with Bootstrap 4
问题描述
Bootstrap 3 模式工作正常:https://jsfiddle.net/qLy7gk3f/4/
Bootstrap 3 modal works fine: https://jsfiddle.net/qLy7gk3f/4/
但是 Bootstrap 4 模式没有:https://jsfiddle.net/qLy7gk3f/3/
But Bootstrap 4 modal doesn't: https://jsfiddle.net/qLy7gk3f/3/
代码相同:
$scope.click = function() {
$uibModal.open({
templateUrl: "modal.html",
controller: "modal",
scope: $scope
});
}
如何让 AngularUI 模态与 Bootstrap 4 一起使用?
How can I get AngularUI modals to work with Bootstrap 4?
推荐答案
我认为这只是添加 .in
类的一种情况,具体来说:
I think it's just a case of adding the .in
classes, specifically:
.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
Or you could modify Bootstrap 4 to use the show
class:
https://github.com/angular-ui/bootstrap/issues/4234#issuecomment-285303515
这篇关于带有 Bootstrap 4 的 Angular UI 模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!