【发布时间】:2019-12-13 15:16:02
【问题描述】:
我正在开发一个 Angular 6 项目。我已经为应用程序创建了一个演示模式,即具有下一个和上一个按钮的工具提示。当工具提示处于活动状态时,我已将 Angular CDK 覆盖附加到工具提示(下面的代码),这会使网站变得模糊。到现在为止,如预期的那样。现在,我想突出显示工具提示附加到的元素。
HTML
<div class="widget-toolbar pull-right">
<helpcomp-button
id="wiki1"
[style]="{'width': 'auto'}"
[label]="'?'"
[mdePopoverTriggerFor] = "wiki1"
[classes] = "'blue-green-transition'">
</helpcomp-button>
<mde-popover #wiki1="mdePopover" mdeFocusTrapAutoCaptureEnabled="true"
[mdePopoverOverlapTrigger]="false" mdePopoverTriggerOn="disable"
mdePopoverArrowWidth="15" mdePopoverArrowColor="#34ebe8">
<mat-card style="
background:#34ebe8;
color:#1f27cc;" state-step=1>
<mat-card-content>
<button type="button" macocoTooltip state-step=3>To Personal</button>
<button type="button" macocoTooltip state-step=4>To Faculty</button>
<p> sample tooltip </p>
</mat-card-content>
<mat-card-actions>
<button type="button" macocoTooltip>Previous</button>
<button type="button" macocoTooltip>Next</button>
</mat-card-actions>
</mat-card>
现在如何突出显示该元素?我正在尝试解决这个问题一天,非常感谢您的建议。谢谢。
【问题讨论】:
-
position +z-index 应该能够把它放在前面。你试过了吗?
-
是的,zIndex 确实有效,但我认为它不是一个好的标准。
-
这就是z-index的目的……
-
是的,但是设置索引值适用于某些元素,而不适用于某些元素。
-
最好的就是你管理得最好的;)
标签: html css angular6 overlay angular-cdk