css3-background-clip-padding-box-ref.html (1218B)
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8" /> 5 <title>CSS Backgrounds Test:background clip property with value padding-box</title> 6 <link rel="author" title="yanshasha" href="mailto:yanshasha133@gmail.com" /> 7 <link rel="reviewer" title="Dayang Shen" href="mailto:shendayang@baidu.com"> <!-- 2013-09-03 --> 8 <style type="text/css"> 9 .box { 10 width: 200px; 11 height: 200px; 12 position: relative; 13 } 14 .box div { 15 position: absolute; 16 } 17 #div1 { 18 top: 0; 19 left: 0; 20 right: 0; 21 bottom: 0; 22 background-color: green; 23 } 24 #div2 { 25 top: 15px; 26 left: 15px; 27 right: 15px; 28 bottom: 15px; 29 background-color: yellow; 30 } 31 </style> 32 </head> 33 <body> 34 <p> 35 The test passes if threre are two overlapping squares with different color(green and yellow from outside to inside). 36 </p> 37 <div class="box"> 38 <div id="div1"></div> 39 <div id="div2"></div> 40 </div> 41 </body> 42 </html>