image-orientation-img-object-fit.html (1190B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Images Module Level 3: image-orientation: from-image</title> 6 <link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org"> 7 <link rel="help" href="https://drafts.csswg.org/css-images-3/#propdef-image-orientation"> 8 <link rel="match" href="reference/image-orientation-img-object-fit-ref.html"> 9 <meta name=fuzzy content="0-5;0-375"> 10 <style> 11 body { 12 overflow: hidden; 13 image-orientation: from-image; 14 } 15 img { 16 position: absolute; 17 vertical-align: top; 18 } 19 .cover { 20 object-fit: cover; 21 top: 10px; 22 } 23 .contain { 24 object-fit: contain; 25 top: 150px; 26 } 27 .wide { 28 width: 100px; 29 height: 50px; 30 left: 10px; 31 } 32 .tall { 33 width: 50px; 34 height: 100px; 35 left: 150px; 36 } 37 </style> 38 </head> 39 <body> 40 <img class="cover wide" src="support/exif-orientation-5-lu.jpg"/> 41 <img class="cover tall" src="support/exif-orientation-5-lu.jpg"/> 42 <img class="contain wide" src="support/exif-orientation-5-lu.jpg"/> 43 <img class="contain tall" src="support/exif-orientation-5-lu.jpg"/> 44 </body> 45 </html>