1 <!DOCTYPE html>
2 <html><head>
3 <meta charset="utf-8">
4 <title>CSS Backgrounds and Borders Test: background-origin 'border-box' with background-clip 'padding-box'</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-007-ref.htm" rel="match">
9 <meta content="image" name="flags">
10 <meta content="Check if 'background-clip' is 'padding-box', 'background-origin' is 'border-box', 'background-position' is 'top left' (the initial value), and the element has a non-zero border, that expecting the top and left of the background image will be clipped." name="assert">
11 <style>
12 div {
13 position: absolute;
14 }
15 #ref-overlapping-green {
16 background-color: green;
17 height: 55px;
18 left: 5px;
19 top: 5px;
20 width: 55px;
21 }
22 #test-overlapped-red {
23 background-clip: padding-box;
24 background-image: url(support/60x60-red.png);
25 background-origin: border-box;
26 background-position: top left;
27 background-repeat: no-repeat;
28 border: transparent dotted 5px;
29 height: 100px;
30 padding: 25px;
31 width: 100px;
32 }
33 </style>
34 </head>
35 <body>
36 <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
37 <div id="container">
38 <div id="test-overlapped-red"></div>
39 <div id="ref-overlapping-green"></div>
40 </div>
41
42
43 </body></html>