跳到主要内容
版本:v8

背景幕组件

shadow

背景幕(Backdrop)是全屏组件,会覆盖在其他组件之上。它们通常用在那些从其他内容上方滑入的组件背后,并且可以用于关闭该组件。

基本用法

背景幕会阻止点击或触摸其背后的内容。默认情况下它是透明的,因此下面的演示包含了使其可见的 CSS。

样式设置

可以通过直接向背景幕元素分配 CSS 属性来自定义背景幕。常见的属性包括 background-colorbackgroundopacity

可以通过在内容上设置比背景幕更高的 z-index 值(默认为 2)来在背景幕上方显示内容。

属性

stopPropagation

DescriptionIf true, the backdrop will stop propagation on tap.
Attributestop-propagation
Typeboolean
Defaulttrue

tappable

DescriptionIf true, the backdrop will can be clicked and will emit the ionBackdropTap event.
Attributetappable
Typeboolean
Defaulttrue

visible

DescriptionIf true, the backdrop will be visible.
Attributevisible
Typeboolean
Defaulttrue

事件

NameDescriptionBubbles
ionBackdropTapEmitted when the backdrop is tapped.true

方法

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS 自定义属性

No CSS custom properties available for this component.

插槽

No slots available for this component.