Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Titre du document</title> <style> #element { position: relative; height: 250px; width: 250px; margin: 50px; padding: 10px; border: 2px solid #666; background-color: #eee; } #element1 { padding: 50px; position: absolute; border: 2px solid #000; background-color: #8ebf42; -webkit-transform: rotateY(50deg); -webkit-transform-style: preserve-3d; transform: rotateY(50deg); transform-style: preserve-3d; } #element2 { padding: 50px; position: absolute; border: 2px solid #000; background-color: #1c87c9; -webkit-transform: rotateY(-100deg); transform: rotateY(-100deg); } </style> </head> <body> <h2>Exemple de la propriété transform-style</h2> <div id="element"> <div id="element1"> Vert <div id="element2">Bleu</div> </div> </div> </body> </html>