跳到主要内容
版本:v8

ion-backdrop

shadow

背景遮罩是全屏组件,覆盖在其他组件之上。它们适用于在其他内容上方过渡显示的组件背后,并可用于关闭该组件。

基本用法​

背景遮罩可防止点击或触摸其背后的内容。默认情况下它是透明的,因此下面的演示包含使其可见的 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说明冒泡
ionBackdropTapEmitted when the backdrop is tapped.true

Methods​

该组件没有可用的公共方法。

CSS Shadow Parts​

该组件没有可用的 CSS 阴影部分。

CSS Custom Properties​

该组件没有可用的 CSS 自定义属性。

Slots​

该组件没有可用的插槽。