10-03-simple-transform.html 977 B

1234567891011121314151617181920212223242526272829303132
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Simple transform</title>
  6. <style>
  7. /**
  8. * 1. Prefixes are required for a lot of older browsers. Depending on
  9. * how essential it is to support legacy browsers, you may need all
  10. * or some of these - check http://caniuse.com for current browser support.
  11. */
  12. .box {
  13. width: 100px;
  14. height: 100px;
  15. margin-top: 20px;
  16. position: absolute;
  17. top: 200px;
  18. left: 200px;
  19. background-color: #eee;
  20. outline: 1px solid;
  21. -webkit-transform: rotate(45deg); /* 1 */
  22. -moz-transform: rotate(45deg); /* 1 */
  23. -ms-transform: rotate(45deg); /* 1 */
  24. -o-transform: rotate(45deg); /* 1 */
  25. transform: rotate(45deg); /* 1 */
  26. }
  27. </style>
  28. </head>
  29. <body>
  30. <div class="box"></div>
  31. </body>
  32. </html>