background-origin-006.html (1754B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Backgrounds and Borders Test: background-origin 'content-box' with background-attachment 'fixed'</title> 6 <link rel="author" title="Intel" href="http://www.intel.com"> 7 <link rel="reviewer" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/"> <!-- 2012-11-09 --> 8 <link rel="help" href="http://www.w3.org/TR/css3-background/#the-background-origin" title="3.8. Positioning Area: the 'background-origin' property"> 9 <link rel="match" href="reference/background-origin-006-ref.html"> 10 <meta name="flags" content="image"> 11 <meta name="assert" content="Check if the 'background-attachment' value is 'fixed' that expecting 'background-origin' has no effect and the background positioning area is the initial containing block."> 12 <style> 13 html { 14 padding-left: 170px; 15 } 16 div { 17 left: 0px; 18 position: absolute; 19 top: 0px; 20 } 21 #ref-overlapped-red { 22 background-color: red; 23 height: 60px; 24 width: 60px; 25 } 26 #test-overlapping-green { 27 background-attachment: fixed; 28 background-image: url(support/60x60-green.png); 29 background-origin: content-box; 30 background-repeat: no-repeat; 31 border: transparent dotted 5px; 32 height: 100px; 33 padding: 25px; 34 width: 100px; 35 } 36 </style> 37 </head> 38 <body> 39 <p>Test passes if there is a filled green square at the left of the page and <strong>no red</strong>.</p> 40 <div id="ref-overlapped-red"> 41 <div id="test-overlapping-green"></div> 42 </div> 43 </body> 44 </html>