background-origin-002

background-origin - initial value

WeasyPrint

Reference (good) by WeasyPrint

Reference (good) by this browser

This browser

Flags
image
Assertion
Background-origin with initial value implies to position the background relative to the padding box.

Source

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