css - 如何使用 Angular Material 禁用背景

标签 css angularjs material-design

我正在做一个元素,我使用了很多 md 对话框。我想知道如何禁用背景。我查看了 inspect element (Chrome),但似乎找不到任何样式来禁用....

有人有想法吗?

最佳答案

The docs for $mdDialog say :

hasBackdrop - {boolean=}: Whether there should be an opaque backdrop behind the dialog. Default true.

var confirm = $mdDialog.confirm()
  .parent(angular.element(document.body))
  .title('Would you like to delete your debt?')
  .content('All of the banks have agreed to forgive you your debts.')
  .ariaLabel('Lucky day')
  .ok('Please do it!')
  .cancel('Sounds like a scam')
  .targetEvent(ev)
  .hasBackdrop(false);

工作代码笔:http://codepen.io/anon/pen/dogrXG

单击该按钮,您会看到一个没有背景的对话框。

关于css - 如何使用 Angular Material 禁用背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31649262/

相关文章:

css - 我无法在元素中使用node-bourbon

javascript - 排列 $scope 内对象的顺序

javascript - Angular JS 用户配置文件网格

angular - 多个 mat-select 从全部选中开始?

android - 如何实现 Material 设计旋转器

css - img alt 更改图像尺寸

javascript - 创建弹出菜单/侧边栏菜单时出现问题

html - 图像 slider 上的猫头鹰分页

javascript - Angularjs 组件和 $watch 在 ES6 中绑定(bind)

Android - 如何获取 bottomnavigationview 的高度