Skip to content

Commit 6142371

Browse files
adding moz-context-properties demo
1 parent 5457417 commit 6142371

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

moz-context-properties/index.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Basic context-fill/context-stroke/-moz-context-properties test</title>
5+
<style>
6+
7+
img {
8+
width: 100px;
9+
height: 100px;
10+
-moz-context-properties: fill, stroke;
11+
}
12+
13+
.img1 {
14+
fill: lime;
15+
stroke: purple;
16+
}
17+
18+
.img2 {
19+
fill: blue;
20+
stroke: orange;
21+
}
22+
23+
.img3 {
24+
fill: yellow;
25+
stroke: red;
26+
}
27+
28+
</style>
29+
</head>
30+
<body>
31+
<img class="img1" src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'>
32+
<rect width='100%' height='100%' stroke-width='30px'
33+
fill='context-fill red' stroke='context-stroke' fill-opacity='0.5'/></svg>">
34+
<img class="img2" src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'>
35+
<rect width='100%' height='100%' stroke-width='30px'
36+
fill='context-fill yellow' stroke='context-stroke'/></svg>">
37+
<img class="img3" src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'>
38+
<rect width='100%' height='100%' stroke-width='30px'
39+
fill='context-stroke' stroke='context-fill red'/></svg>">
40+
</body>
41+
</html>

0 commit comments

Comments
 (0)