object-fit-contain-svg-003-ref.html 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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 Reftest Reference</title>
  10. <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
  11. <style type="text/css">
  12. .objectOuter {
  13. border: 1px dashed gray;
  14. padding: 1px;
  15. float: left;
  16. }
  17. .objectOuter > * {
  18. background-image: url("colors-16x8-noSize.svg");
  19. background-size: contain;
  20. background-repeat: no-repeat;
  21. }
  22. .bigWide {
  23. width: 48px;
  24. height: 32px;
  25. }
  26. .bigTall {
  27. width: 32px;
  28. height: 48px;
  29. }
  30. .small {
  31. width: 8px;
  32. height: 8px;
  33. }
  34. br { clear: both; }
  35. .tr { background-position: top right }
  36. .bl { background-position: bottom left }
  37. .tl { background-position: top 25% left 25% }
  38. .br { background-position: bottom 1px right 2px }
  39. .tc { background-position: top 3px center }
  40. .cr { background-position: center right 25% }
  41. .default { background-position: 50% 50% }
  42. </style>
  43. </head>
  44. <body>
  45. <!-- big/wide: -->
  46. <div class="objectOuter"><div class="bigWide tr"></div></div>
  47. <div class="objectOuter"><div class="bigWide bl"></div></div>
  48. <div class="objectOuter"><div class="bigWide tl"></div></div>
  49. <div class="objectOuter"><div class="bigWide br"></div></div>
  50. <div class="objectOuter"><div class="bigWide tc"></div></div>
  51. <div class="objectOuter"><div class="bigWide cr"></div></div>
  52. <div class="objectOuter"><div class="bigWide default"></div></div>
  53. <br>
  54. <!-- big/tall: -->
  55. <div class="objectOuter"><div class="bigTall tr"></div></div>
  56. <div class="objectOuter"><div class="bigTall bl"></div></div>
  57. <div class="objectOuter"><div class="bigTall tl"></div></div>
  58. <div class="objectOuter"><div class="bigTall br"></div></div>
  59. <div class="objectOuter"><div class="bigTall tc"></div></div>
  60. <div class="objectOuter"><div class="bigTall cr"></div></div>
  61. <div class="objectOuter"><div class="bigTall default"></div></div>
  62. <br>
  63. <!-- small: -->
  64. <div class="objectOuter"><div class="small tr"></div></div>
  65. <div class="objectOuter"><div class="small bl"></div></div>
  66. <div class="objectOuter"><div class="small tl"></div></div>
  67. <div class="objectOuter"><div class="small br"></div></div>
  68. <div class="objectOuter"><div class="small tc"></div></div>
  69. <div class="objectOuter"><div class="small cr"></div></div>
  70. <div class="objectOuter"><div class="small default"></div></div>
  71. <br>
  72. </body>
  73. </html>