Created
February 16, 2026 18:24
-
-
Save librasteve/bb8e56357ba1fc395ffdc5c39dbe370c to your computer and use it in GitHub Desktop.
Copy Pasteable Tooltip
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .tooltip { | |
| position: relative; | |
| display: inline-block; | |
| } | |
| .tooltip-content { | |
| display: none; | |
| position: absolute; | |
| top: 120%; | |
| left: 0; | |
| background: #222; | |
| color: white; | |
| padding: 10px; | |
| border-radius: 6px; | |
| width: 250px; | |
| user-select: text; | |
| } | |
| .tooltip-content.active { | |
| display: block; | |
| } | |
| </style> | |
| <div class="tooltip"> | |
| <button onclick="toggleTooltip()">Click me</button> | |
| <div id="tip" class="tooltip-content"> | |
| You can highlight and copy this text safely. | |
| </div> | |
| </div> | |
| <script> | |
| function toggleTooltip() { | |
| document.getElementById("tip").classList.toggle("active"); | |
| } | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment