image-orientation-img-object-fit-ref.html (1134B)
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 <style> 9 body { 10 overflow: hidden; 11 image-orientation: from-image; 12 } 13 img { 14 position: absolute; 15 vertical-align: top; 16 } 17 .cover { 18 object-fit: cover; 19 top: 10px; 20 } 21 .contain { 22 object-fit: contain; 23 top: 150px; 24 } 25 .wide { 26 width: 100px; 27 height: 50px; 28 left: 10px; 29 } 30 .tall { 31 width: 50px; 32 height: 100px; 33 left: 150px; 34 } 35 </style> 36 </head> 37 <body> 38 <img class="cover wide" src="../support/exif-orientation-5-lu-pre-rotated.jpg"/> 39 <img class="cover tall" src="../support/exif-orientation-5-lu-pre-rotated.jpg"/> 40 <img class="contain wide" src="../support/exif-orientation-5-lu-pre-rotated.jpg"/> 41 <img class="contain tall" src="../support/exif-orientation-5-lu-pre-rotated.jpg"/> 42 </body> 43 </html>