Files
30-seconds-of-code/snippets/disable-selection.md
Angelos Chalaris d2c10f3e65 Deprecate browser support
Bump integration tools to 2.1.0
2020-04-29 13:47:57 +03:00

388 B

title, tags
title tags
Disable selection interactivity,beginner

Makes the content unselectable.

<p>You can select me.</p>
<p class="unselectable">You can't select me!</p>
.unselectable {
  user-select: none;
}

Explanation

  • user-select: none specifies that the text cannot be selected.
  • This is not a secure method to prevent users from copying content.