1 <!DOCTYPE html>
2 <html lang="en"><head>
3 <meta charset="utf-8">
4 <title>CSS Backgrounds Test:background clip property with value border-box</title>
5 <link href="mailto:yanshasha133@gmail.com" rel="author" title="yanshasha">
6 <link href="mailto:shendayang@baidu.com" rel="reviewer" title="Dayang Shen"> <!-- 2013-08-26 -->
7 <link href="http://www.w3.org/TR/css3-background/#the-background-clip" rel="help">
8 <link href="reference/css3-background-clip-border-box-ref.htm" rel="match">
9 <style type="text/css">
10 .box {
11 width: 200px;
12 height: 200px;
13 position: relative;
14 }
15 .box div {
16 position: absolute;
17 }
18 #div1 {
19 top: 0;
20 left: 0;
21 right: 0;
22 bottom: 0;
23 background-color: red;
24 }
25 #div2 {
26 top: 15px;
27 left: 15px;
28 right: 15px;
29 bottom: 15px;
30 background-color: yellow;
31 }
32 #div3 {
33 top: 0;
34 left: 0;
35 right: 0;
36 bottom: 0;
37 border: solid 15px transparent;
38 padding: 15px;
39 background-color: green;
40 background-clip: border-box;
41 }
42 </style>
43 </head>
44 <body>
45
46 <p>
47 The test passes if there is only one green box.
48 </p>
49 <div class="box">
50 <div id="div1"></div>
51 <div id="div2"></div>
52 <div id="div3"></div>
53 </div>
54
55
56 </body></html>