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> <head> <style> div { couleur-de-fond: vert; } div.first { opacité: 0.1; } div.second { opacité: 0.3; } div.third { opacité: 0.6; } </style> </head> <body> <h1>Boîtes Transparentes</h1> <p>Lorsque vous utilisez la propriété opacity pour ajouter de la transparence à l'arrière-plan d'un élément, tous ses éléments enfants deviennent également transparents. Cela peut rendre le texte à l'intérieur d'un élément entièrement transparent difficile à lire :</p> <div class="first"> <h1>opacité 0.1</h1> </div> <div class="second"> <h1>opacity 0.3</h1> </div> <div class="third"> <h1>opacity 0.6</h1> </div> <div> <h1>opacité 1 (par défaut)</h1> </div> </body> </html>