Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-images/gradient-border-box.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Gradient Background aligned to Content Box</title>
<link rel="match" href="gradient-border-box-ref.html">
<meta name="assert" content="The background-origin: border-box; statement is understood.">
<style>
#x {
background-origin: border-box;
width: 200px;
height: 200px;
border-style: solid;
border-width: 40px;
border-color: transparent;
background-image: repeating-linear-gradient(to bottom right, white, black, white 30px);
}
</style>
</head>
<body>
<div id="x"></div>
</body>
</html>