servo/tests/wpt/css-tests/css-backgrounds-3_dev/xhtml1/background-clip-content-box-001.xht

36 lines
No EOL
1.2 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>CSS Backgrounds and Borders Test: background-clip Reference</title>
<link href="mailto:wangjian@ucweb.com" rel="author" title="James Wang" />
<link href="http://www.w3.org/TR/css3-background/#the-background-clip" rel="help" />
<meta content="" name="flags" />
<meta content="background-clip with content-box means paint the background within the content box" name="assert" />
<link href="reference/background-clip-content-box-ref.xht" rel="match" />
<style type="text/css">
* { padding: 0; margin: 0; }
#test-color-blue {
background-color: blue;
height: 200px;
position: absolute;
width: 200px;
}
#test-color-green {
background-clip: content-box;
background-color: rgba(0, 255, 0, 1);
height: 180px;
padding: 10px;
position: absolute;
width: 180px;
}
</style>
</head>
<body>
<p>Test pass if the green box has a 10px width red edge</p>
<!-- background -->
<div id="test-color-blue"></div>
<div id="test-color-green"></div>
</body></html>