perspective-origin-3-ref.html 847 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <style type="text/css">
  4. .parentWithPerspective {
  5. -moz-perspective: 100px;
  6. -moz-perspective-origin: 150px 150px;
  7. -webkit-perspective: 100px;
  8. -webkit-perspective-origin: 150px 150px;
  9. /* Changing width/height to 500px should not change the rendering. */
  10. height:100%;
  11. }
  12. .parentWithPerspective > div {
  13. position:absolute;
  14. top:100px;
  15. left:100px;
  16. width:100px;
  17. height:100px;
  18. }
  19. .notTransformed {
  20. outline: 1px solid black;
  21. }
  22. .transformed {
  23. background:blue;
  24. -moz-transform-origin: 0% 0%;
  25. -moz-transform: rotateY(45deg);
  26. -webkit-transform-origin: 0% 0%;
  27. -webkit-transform: rotateY(45deg);
  28. }
  29. </style>
  30. <body>
  31. <div class="parentWithPerspective">
  32. <div class="notTransformed"></div>
  33. <div class="transformed"></div>
  34. </div>
  35. </body>
  36. </html>