object-view-box-fit-none-svg.html (994B)
1 <!-- This is an autogen file. Run support/generate_object_view_box_tests.py to update --> 2 <!DOCTYPE html> 3 <html> 4 <title>CSS object-view-box with object-fit:none</title> 5 <link rel="author" href="mailto:khushalsagar@chromium.org"> 6 <link rel="match" href="object-view-box-fit-none-svg-ref.html"> 7 <script src="support/testHelper.js"></script> 8 <link rel="help" href="https://drafts.csswg.org/css-images-4/#the-object-view-box"> 9 10 <body> 11 <style> 12 .view_box_subset { 13 width: 50px; 14 height: 100px; 15 object-view-box: inset(50px 0px 0px 0px); 16 object-fit: none; 17 background-color: grey; 18 margin: 5px; 19 } 20 21 .view_box_subset_with_position { 22 width: 50px; 23 height: 100px; 24 object-view-box: inset(50px 0px 0px 0px); 25 object-fit: none; 26 background-color: grey; 27 margin: 5px; 28 object-position: 10px 10px; 29 } 30 </style> 31 </body> 32 <img class="view_box_subset"></img> 33 <img class="view_box_subset_with_position"></img> 34 </body> 35 <script> 36 populateElements("support/blue-green-red-yellow-50x100.svg"); 37 </script>