html - 如何更改重叠按钮的 "click order"?

标签 html css angular user-interface click

我有一个元素有两个重叠的按钮:红色按钮在底部,黄色按钮在顶部。

问题是黄色按钮“隐藏”了红色按钮的一部分。我希望它可见,但不可点击。 我需要底部的红色按钮完全可点击,就好像顶部的黄色按钮不存在一样。

有人可以帮我解决 html/css 代码吗?

下面提供了元素链接。

谢谢。

https://stackblitz.com/edit/angular-custom-button-4xyvp6

最佳答案

使用指针事件:无

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/

相关文章:

html - @media 查询不工作(不改变 <h1> 的颜色)

javascript - 字体大小,使用追加时div框大小不变

html - 网站在大多数浏览器上无法正确缩放,大多数元素都放错了位置

html - 当彼此相邻显示为内联 block 时,CSS 会向上移动内容

javascript - 在函数中传递(通过引用)作用域中的变量

javascript - 如何在css div中创建曲线?

jquery - 向下滑动和向上滑动切换

javascript - 如何在 Angular 中使用 JavaScript 代码?

Angular 5 模式验证不适用于动态 react 形式

html - 根据 Angular 6 中的条件更改 div 宽度