ion-backdrop
背景遮罩是全屏组件,覆盖在其他组件之上。它们适用于在其他内容上方过渡显示的组件背后,并可用于关闭该组件。
基本用法
背景遮罩可防止点击或触摸其背后的内容。默认情况下它是透明的,因此下面的演示包含使其可见的 CSS。
样式
可以通过直接将 CSS 属性分配给背景遮罩元素来自定义背景遮罩。常用属性包括 background-color、background 和 opacity。
通过为内容设置高于背景遮罩(默认为 2)的 z-index,可以在背景遮罩上方显示内容。
Properties
stopPropagation
| 说明 | If true, the backdrop will stop propagation on tap. |
| 属性 | stop-propagation |
| 类型 | boolean |
| 默认值 | true |
tappable
| 说明 | If true, the backdrop will can be clicked and will emit the ionBackdropTap event. |
| 属性 | tappable |
| 类型 | boolean |
| 默认值 | true |
visible
| 说明 | If true, the backdrop will be visible. |
| 属性 | visible |
| 类型 | boolean |
| 默认值 | true |
Events
| Name | 说明 | 冒泡 |
|---|---|---|
ionBackdropTap | Emitted when the backdrop is tapped. | true |
Methods
该组件没有可用的公共方法。
CSS Shadow Parts
该组件没有可用的 CSS 阴影部分。
CSS Custom Properties
该组件没有可用的 CSS 自定义属性。
Slots
该组件没有可用的插槽。