css3-background-size-001-ref.html (1117B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8" /> 5 <title>CSS Backgrounds Test:background size property</title> 6 <link rel="author" title="yanshasha" href="mailto:yanshasha133@gmail.com" /> 7 <link rel="reviewer" title="Dayang Shen" href="mailto:shendayang@baidu.com"> <!-- 2013-09-03 --> 8 <style type="text/css"> 9 div { 10 width: 150px; 11 height: 150px; 12 } 13 img { 14 display: block; 15 } 16 #div1 img { 17 width: 30%; 18 } 19 #div2 img { 20 width: 60%; 21 } 22 #div3 img { 23 width: 100%; 24 } 25 </style> 26 </head> 27 <body> 28 <p> 29 The test passes if the following three green squares have different size. 30 </p> 31 <div id="div1"><img src="../support/green-150-150.png" alt="30% image" /> 32 </div> 33 <div id="div2"><img src="../support/green-150-150.png" alt="60% image" /> 34 </div> 35 <div id="div3"><img src="../support/green-150-150.png" alt="100% image" /> 36 </div> 37 </body> 38 </html>