Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Заголовок документа</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>Пример свойства transform-style</h2> <div id="element"> <div id="element1"> Green <div id="element2">Blue</div> </div> </div> </body> </html