background-334.html (1590B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Backgrounds and Borders Test: background shorthand - background-size '100% auto'</title> 6 <link rel="author" title="Intel" href="http://www.intel.com"> 7 <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background" title="3.10. Backgrounds Shorthand: the 'background' property"> 8 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2012-11-09 --> 9 <!-- 10 http://www.gtalbot.org/BrowserBugsSection/review/background-334-review.html 11 --> 12 <link rel="match" href="reference/background-334-ref.xht"> 13 <meta name="flags" content="image"> 14 <meta name="assert" content="Background-size with '100% auto' implies to rescale the image horizontally so that it fills the background area width and to rescale the image vertically so that it fills the background area height."> 15 <style> 16 #ref { 17 background-color: red; 18 height: 160px; 19 width: 160px; 20 } 21 #test { 22 background: #CCC url(support/60x60-green.png) top left / 100% auto no-repeat; 23 border: black dotted 5px; 24 bottom: 160px; 25 height: 100px; 26 padding: 25px; 27 position: relative; 28 width: 100px; 29 } 30 </style> 31 </head> 32 <body> 33 <p>Test passes if there is a filled green square with gray background, black dotted borders and <strong>no red</strong>.</p> 34 <div id="ref"></div> 35 <div id="test"></div> 36 </body> 37 </html>