object-fit-contain-webm-002.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!DOCTYPE html>
  2. <!--
  3. Any copyright is dedicated to the Public Domain.
  4. http://creativecommons.org/publicdomain/zero/1.0/
  5. -->
  6. <html>
  7. <head>
  8. <meta charset="utf-8">
  9. <title>CSS Test: 'object-fit: contain' on video element, with a WebM video and with various 'object-position' values</title>
  10. <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
  11. <link rel="help" href="http://www.w3.org/TR/css3-images/#sizing">
  12. <link rel="help" href="http://www.w3.org/TR/css3-images/#the-object-fit">
  13. <link rel="help" href="http://www.w3.org/TR/css3-images/#the-object-position">
  14. <link rel="match" href="object-fit-contain-webm-002-ref.html">
  15. <style type="text/css">
  16. video {
  17. border: 1px dashed gray;
  18. padding: 1px;
  19. object-fit: contain;
  20. image-rendering: -moz-crisp-edges;
  21. float: left;
  22. }
  23. .bigWide {
  24. width: 48px;
  25. height: 32px;
  26. }
  27. .bigTall {
  28. width: 32px;
  29. height: 48px;
  30. }
  31. .small {
  32. width: 8px;
  33. height: 8px;
  34. }
  35. br { clear: both; }
  36. .tr { object-position: top right }
  37. .bl { object-position: bottom left }
  38. .tl { object-position: top 25% left 25% }
  39. .br { object-position: bottom 1px right 2px }
  40. .tc { object-position: top 3px center }
  41. .cr { object-position: center right 25% }
  42. </style>
  43. </head>
  44. <body>
  45. <!-- big/wide: -->
  46. <video src="colors-8x16.webm" class="bigWide tr"></video>
  47. <video src="colors-8x16.webm" class="bigWide bl"></video>
  48. <video src="colors-8x16.webm" class="bigWide tl"></video>
  49. <video src="colors-8x16.webm" class="bigWide br"></video>
  50. <video src="colors-8x16.webm" class="bigWide tc"></video>
  51. <video src="colors-8x16.webm" class="bigWide cr"></video>
  52. <video src="colors-8x16.webm" class="bigWide"></video>
  53. <br>
  54. <!-- big/tall: -->
  55. <video src="colors-8x16.webm" class="bigTall tr"></video>
  56. <video src="colors-8x16.webm" class="bigTall bl"></video>
  57. <video src="colors-8x16.webm" class="bigTall tl"></video>
  58. <video src="colors-8x16.webm" class="bigTall br"></video>
  59. <video src="colors-8x16.webm" class="bigTall tc"></video>
  60. <video src="colors-8x16.webm" class="bigTall cr"></video>
  61. <video src="colors-8x16.webm" class="bigTall"></video>
  62. <br>
  63. <!-- small: -->
  64. <video src="colors-8x16.webm" class="small tr"></video>
  65. <video src="colors-8x16.webm" class="small bl"></video>
  66. <video src="colors-8x16.webm" class="small tl"></video>
  67. <video src="colors-8x16.webm" class="small br"></video>
  68. <video src="colors-8x16.webm" class="small tc"></video>
  69. <video src="colors-8x16.webm" class="small cr"></video>
  70. <video src="colors-8x16.webm" class="small"></video>
  71. <br>
  72. </body>
  73. </html>