Skip to content

Commit

Permalink
Add reference to pointer-events property (mdn#29637)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
3 people authored Oct 16, 2023
1 parent da05138 commit e194ecd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions files/en-us/web/css/opacity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e194ecd

Please sign in to comment.