10-25-1-perspective-origin.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>The Perspective Origin property</title>
  6. <style>
  7. body {
  8. display: -webkit-box;
  9. display: -webkit-flex;
  10. display: -moz-box;
  11. display: -ms-flexbox;
  12. display: flex;
  13. -webkit-flex-wrap: wrap;
  14. -ms-flex-wrap: wrap;
  15. flex-wrap: wrap;
  16. -webkit-box-pack: justify;
  17. -webkit-justify-content: space-between;
  18. -moz-box-pack: justify;
  19. -ms-flex-pack: justify;
  20. justify-content: space-between;
  21. -webkit-perspective: 800px;
  22. -moz-perspective: 800px;
  23. perspective: 800px;
  24. }
  25. .box {
  26. border: 2px solid;
  27. background-color: #eee;
  28. width: 100px;
  29. height: 100px;
  30. margin: 20px;
  31. -webkot-transform: rotateX(90deg);
  32. -moz-transform: rotateX(90deg);
  33. transform: rotateX(90deg);
  34. }
  35. </style>
  36. </head>
  37. <body>
  38. <div class="box"></div>
  39. <div class="box"></div>
  40. <div class="box"></div>
  41. <div class="box"></div>
  42. <div class="box"></div>
  43. <div class="box"></div>
  44. <div class="box"></div>
  45. <div class="box"></div>
  46. <div class="box"></div>
  47. <div class="box"></div>
  48. <div class="box"></div>
  49. <div class="box"></div>
  50. <div class="box"></div>
  51. <div class="box"></div>
  52. <div class="box"></div>
  53. <div class="box"></div>
  54. </body>
  55. </html>