background-size-cover.xht (977B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test Reference: background-size:cover</title> 5 <link rel="author" title="Jeffrey Carl Faden" href="http://www.jeffreyatw.com/" /> 6 <style type="text/css"> 7 <![CDATA[ 8 div { 9 background-color: red; 10 height: 200px; 11 width: 200px; 12 overflow: hidden; 13 } 14 div > img { 15 height: 200px; 16 width: 320px; 17 } 18 ]]> 19 </style> 20 </head> 21 <body> 22 <p><img src="support/rectangle-96x60.png" alt="Image download support must be enabled"/></p> 23 <p>Test passes if a scaled portion of above image appears inside the below square.</p> 24 <p>Test fails if any red area is seen outside of the image.</p> 25 <div> 26 <img src="support/rectangle-96x60.png" alt="Image download support must be enabled"/> 27 </div> 28 </body> 29 </html>