Angular UI 模态指令,缺少背景 [英] Angular UI modal directive, backdrop missing

查看:24
本文介绍了Angular UI 模态指令,缺少背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 UI Bootstrap 的 modal 指令时没有背景http://angular-ui.github.io/bootstrap/.模态本身正在工作.

I have no backdrop when using the modal directive from UI Bootstrap http://angular-ui.github.io/bootstrap/. The modal itself is working.

我尝试过使用 ui-bootstrap-tpls.js(包括模板)和不使用模板(手动下载它们).我将标记和 css 与示例中的标记和 css 进行了比较,但我找不到任何区别.一切都在那里.我以前用过它几次,这是我第一次遇到这个问题.这次的不同之处在于我使用的是 sass 版本的 bootstrap.也许与它有关?我不知道在哪里看.

I have tried with both the ui-bootstrap-tpls.js (template included) and without templates (downloading them manually). I compared the the markup and the css with the one from the example and I can't find any difference. Everything is there. I've used it several times before and this is the first time I encounter this issue. The difference this time is that I'm using the sass version of bootstrap. Maybe has something to do with it? I'm out of ideas where to look.

我的版本:

"angular": "1.2.24",
"angular-animate": "~1.2.24"
"angular-bootstrap": "~0.11.2",
"bootstrap-sass-official": "~3.3.1",

任何人有任何想法吗?

推荐答案

来自 Maxisam 的拉取请求链接:https://github.com/angular-ui/bootstrap/pull/3117

from Maxisam's link to the pull request: https://github.com/angular-ui/bootstrap/pull/3117

最简单的解决方法是添加以下 CSS:

the easiest fix is simply to add the following CSS:

html {
  height: 100%;
}

body {
  min-height: 100%;
}

.modal-backdrop {
  bottom: 0;
}

希望它不会破坏你的代码:-)

Hopefully it won't break your code :-)

这篇关于Angular UI 模态指令,缺少背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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