Exécuter
❯
Exécuter le code
Ctrl+Alt+R
Enregistrer le code
Ctrl+Alt+A
Changer d'orientation
Ctrl+Alt+O
Changer de thème
Ctrl+Alt+D
<!DOCTYPE html> <html> <style> .tooltip { position: relative; afficher: inline-block; border-bottom: 1px dotted black; curseur: pointeur; } .tooltiptext { visibilité: caché; largeur: 120px; couleur-de-fond: noir; couleur: #ffffff; text-align: center; border-radius: 6px; padding: 5px 0; position: absolute; z-index: 1; bas: 150%; gauche: 50%; margin-left: -60px; } .tooltiptext::after { contenu: ""; position: absolute; haut: 100%; gauche: 50%; marge-gauche: -5px; largeur-de-bordure: 5px; style-de-bordure: solide; couleur-de-bordure: noir transparent transparent transparent; } .tooltip:hover .tooltiptext { visibilité: visible; } </style> <body style="text-align:center;"> <h2>Tooltip aligné en haut avec flèche en bas</h2> <div class="tooltip">Hover over me <span class="tooltiptext">Texte de l'info-bulle</span> </div> </body> </html>