From e194ecd391cc18ac9eef0648abcaa49bad4c788c Mon Sep 17 00:00:00 2001 From: Irina Kats <116442718+Divensky@users.noreply.github.com> Date: Mon, 16 Oct 2023 13:57:36 -0400 Subject: [PATCH] Add reference to pointer-events property (#29637) * Add reference to pointer-events property * Update files/en-us/web/css/opacity/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/css/opacity/index.md --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Estelle Weyl --- files/en-us/web/css/opacity/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/en-us/web/css/opacity/index.md b/files/en-us/web/css/opacity/index.md index 8c6d0671e3d4b06..9035478a5e90c0e 100644 --- a/files/en-us/web/css/opacity/index.md +++ b/files/en-us/web/css/opacity/index.md @@ -43,6 +43,8 @@ opacity: unset; Using `opacity` with a value other than `1` places the element in a new [stacking context](/en-US/docs/Web/CSS/CSS_positioned_layout/Understanding_z-index/Stacking_context). +When `opacity` value is set to `0`, the element and all of its children are not visible; however, they still register [pointer events](/en-US/docs/Web/API/Pointer_events). This can be controlled with the CSS [`pointer-events`](/en-US/docs/Web/CSS/pointer-events) property. + To change the opacity of a background only, use the {{cssxref("background")}} property with a {{cssxref("color_value", "color value")}} that allows for an alpha channel. For example: ```css