intrinsic-percent-replaced-009-ref.html (409B)
1 <!doctype html> 2 <title>CSS test reference</title> 3 <style> 4 * { 5 margin: 0; 6 padding: 0; 7 box-sizing: border-box; 8 } 9 10 html, body { 11 width: 100%; 12 height: 100%; 13 } 14 15 body { 16 padding: 20px; 17 position: relative; 18 } 19 20 .parent { 21 border: 3px solid green; 22 position: absolute; 23 height: 60vh; 24 } 25 26 .parent img { 27 height: calc(60vh - 6px); 28 } 29 </style> 30 <div class="parent"> 31 <img src="/images/blue96x96.png"> 32 </div>