servo/tests/wpt/css-tests/css-backgrounds-3_dev/html4/background-clip-content-box-001.htm

36 lines
No EOL
1.1 KiB
HTML

<!DOCTYPE html>
<html><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.htm" 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>