Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-backgrounds/background-clip-border-area-and-blend-mode.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Backgrounds and Borders: background-clip color backgrounds</title>
<link rel="match" href="reference/background-clip-border-area-and-blend-mode-ref.html">
<style>
.box {
margin: 20px;
width: 400px;
box-sizing: border-box;
border: 20px solid transparent;
padding: 20px;
font-size: 20pt;
font-weight: 900;
font-family: sans-serif;
text-align: center;
}
.single-background {
background-clip: border-area;
background-image: url('resources/green-100.png');
background-color: blue;
background-blend-mode: lighten;
}
.middle-background {
background-clip: border-area, border-box;
background-image: url('resources/green-100.png'), url('resources/blue-100.png');
background-color: lime;
background-blend-mode: difference, lighten;
}
.last-background {
background-clip: border-box, border-area;
background-image: url('resources/green-100.png'), url('resources/blue-100.png');
background-color: yellow;
background-blend-mode: difference, lighten;
}
</style>
</head>
<body>
<div class="box single-background">Cyan border, white background</div>
<div class="box middle-background">Blue border, cyan background</div>
<div class="box last-background">Magenta border, lime background</div>
</body>
</html>