Open this example in the interactive library
Source code
<style>
.demo {
pointer-events: none;
}
</style>
<span class="demo" aria-hidden="true">Overlay decoration</span>
Prevent pointer events on a decorative layer with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo {
pointer-events: none;
}
</style>
<span class="demo" aria-hidden="true">Overlay decoration</span>