1 <!DOCTYPE html>
2 <html><head>
3 <meta charset="utf-8">
4 <title>CSS Backgrounds and Borders Test: background-size - one <length> value at maximum</title>
5 <link href="http://www.intel.com" rel="author" title="Intel">
6 <link href="http://www.w3.org/TR/css3-background/#the-background-size" rel="help" title="3.9. Sizing Images: the 'background-size' property">
7 <link href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" rel="reviewer" title="Gérard Talbot"> <!-- 2012-11-09 -->
8 <!--
9 http://www.gtalbot.org/BrowserBugsSection/review/background-size-008-review.html
10 -->
11 <link href="reference/ref-filled-green-100px-square.htm" rel="match">
12 <meta content="image" name="flags">
13 <meta content="Check if 'background-size' is '100px', maximum width of the positioning area in length, then such value is the width of the corresponding image and the second value (corresponding to the height of the background image) is assumed to be 'auto'. An 'auto' value for one dimension is resolved by using the image's intrinsic ratio (in this test, the image's intrinsic ratio is 1:1) and (multiplied by) the size of the other dimension. Therefore the used height of the background-size in this test should be 100px." name="assert">
14 <style>
15 div {
16 height: 100px;
17 width: 100px;
18 }
19 #ref-overlapped-red {
20 background-color: red;
21 }
22 #test-overlapping-green {
23 background-image: url(support/50x50-green.png);
24 background-repeat: no-repeat;
25 background-size: 100px;
26 bottom: 100px;
27 position: relative;
28 }
29 </style>
30 </head>
31 <body>
32 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
33 <div id="ref-overlapped-red"></div>
34 <div id="test-overlapping-green"></div>
35
36
37 </body></html>