Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-masking/mask-image/mask-image-url-image-hash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Test: mask-image: url(image.svg#hash)</title>
<link rel="match" href="reference/mask-image-ref.html">
<meta name="assert" content="mask-image can use an SVG file as an image with element reference">
<style>
#back {
position: absolute;
box-sizing: border-box;
width: 200px;
height: 200px;
border: 60px solid green;
background: red;
}
#front {
position: absolute;
box-sizing: border-box;
width: 200px;
height: 200px;
border: 40px solid red;
background: green;
mask-image: url(support/image-with-ref.svg#ref);
}
</style>
<p>The test passes if there is a green square and no red below.</p>
<div id="back"></div><div id="front"></div>