object-view-box-fit-none-svg-ref.html (1152B)
1 <!-- This is an autogen file. Run support/generate_object_view_box_tests.py to update --> 2 <!DOCTYPE html> 3 <title>CSS object-view-box with object-fit:none (ref)</title> 4 <link rel="author" href="mailto:khushalsagar@chromium.org"> 5 <script src="support/testHelper.js"></script> 6 <link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> 7 8 <body> 9 <style> 10 div { 11 margin: 5px; 12 } 13 14 video { 15 object-fit: fill; 16 } 17 18 .container_view_box_subset { 19 width: 50px; 20 height: 100px; 21 overflow: hidden; 22 display: inline-block; 23 background-color: grey; 24 } 25 .view_box_subset { 26 position: relative; 27 top: -25px; 28 } 29 30 .container_view_box_subset_with_position { 31 width: 50px; 32 height: 100px; 33 overflow: hidden; 34 display: inline-block; 35 background-color: grey; 36 } 37 .view_box_subset_with_position { 38 position: relative; 39 top: -40px; 40 left: 10px; 41 } 42 </style> 43 <div class="container_view_box_subset"> 44 <img class="view_box_subset"></img> 45 </div> 46 <div class="container_view_box_subset_with_position"> 47 <img class="view_box_subset_with_position"></img> 48 </div> 49 </body> 50 <script> 51 populateElements("support/blue-green-red-yellow-50x100.svg"); 52 </script>