Guest User

Untitled

a guest
Jul 17th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Layering Test</title>
  5. <style>
  6. .flat {
  7. position: absolute;
  8. -webkit-transform: translate3d(200px,200px,10000px);
  9. -webkit-perspective: 0;
  10. width: 600px;
  11. height: 400px;
  12.  
  13. color: black;
  14. border: 1px solid black;
  15. background-color: rgba(255,255,255,0.5);
  16. }
  17. .perspective_container {
  18. -webkit-perspective: 800;
  19. -webkit-transform-style: preserve-3d;
  20. }
  21. .threed {
  22. position: absolute;
  23.  
  24. -webkit-perspective: 800;
  25. -webkit-transform-style: preserve-3d;
  26. -webkit-transform: translate3d(100px,20px,500px) rotateX(45deg) rotateY(45deg);
  27. width: 800px;
  28. height: 200px;
  29. background-color: #F53;
  30. }
  31. </style>
  32. <script>
  33.  
  34. </script>
  35. </head>
  36. <body>
  37. <div class="flat"><h1>Sample page to demonstrate faux 2d layered over 3d</h1>
  38. This content should be 2d, and layered on top of everything else</div>
  39. <div class="perspective_container">
  40. <div class="threed">This content should be 3d and rotated</div>
  41. </div>
  42. </body>
  43. </html>
Add Comment
Please, Sign In to add comment