blob: aced767c5d02ef4a9437f161228cdb3f2521ca36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
background: blue;
}
div {
margin: 20px;
width: 60px;
height: 60px;
}
.parent {
position: relative;
z-index: -1;
float: left;
background: violet;
}
.child {
background: url('resources/ducky.png') no-repeat 0 0 /100% 100%, green;
}
</style>
<!-- Test to ensure that blending is performed only with the contents of the element's nearest ancestor stacking context.
Test this with a parent element that has zIndex set. Also, tests whether a child element blends if the parent has a blend mode set.-->
<body>
<div class="parent">
<div class="child" style="mix-blend-mode: normal;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: multiply;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: screen;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: overlay;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: darken;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: lighten;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: color-dodge;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: color-burn;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: hard-light;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: soft-light;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: difference;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: exclusion;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: hue;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: saturation;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: color;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
<div class="parent">
<div class="child" style="mix-blend-mode: luminosity;">
<div style="background-color: orange; z-index: 1; position: absolute"></div>
</div>
</div>
</body>
</html>
|