我有一个元素有两个重叠的按钮:红色按钮在底部,黄色按钮在顶部。
问题是黄色按钮“隐藏”了红色按钮的一部分。我希望它可见,但不可点击。 我需要底部的红色按钮完全可点击,就好像顶部的黄色按钮不存在一样。
有人可以帮我解决 html/css 代码吗?
下面提供了元素链接。
谢谢。
最佳答案
使用指针事件:无
The pointer-events CSS property sets under what circumstances (if any) a particular graphic element can become the target of pointer events.
.button2 {
pointer-events: none;
}
fork 示例:https://stackblitz.com/edit/angular-custom-button-ahemot
关于html - 如何更改重叠按钮的 "click order"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55034961/