<!
DOCTYPE html >
<
html class=
"reftest-wait" >
<
head >
<
meta charset=
"utf-8" >
<
title >CSS Masking: mask invalidation.</
title >
<
style type=
"text/css" >
div .outer {
background-color: purple;
position: absolute;
margin:
1 px
2 px
3 px
4 px;
border: solid purple;
width:
40 px;
height:
20 px;
}
div .inner {
width:
10 px;
height:
10 px;
border:
1 px solid transparent;
will-change: transform;
}
div .mask {
mask-size:
100 %
100 %;
mask-origin: border-box;
mask-image: url(
'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg "><rect x="0" y="0" width="100%" height="50%" fill="blue" fill-opacity="1"/><rect x="0" y="50%" width="100%" height="50%" fill="blue" fill-opacity="0"/></svg>' );
}
#d1 {
top:
10 px;
left:
10 px;
mask-clip: padding-box;
border-width:
10 px;
padding:
0 px;
}
#d2 {
top:
10 px;
left:
110 px;
mask-clip: padding-box;
border-width:
0 px;
padding:
10 px;
}
#d3 {
top:
15 px;
left:
215 px;
mask-clip: content-box;
border-width:
10 px;
padding:
0 px;
}
</
style >
</
head >
<
body >
<
div id=
"d1" class=
"outer mask" ><
div class=
"inner" ></
div ></
div >
<
div id=
"d2" class=
"outer mask" ><
div class=
"inner" ></
div ></
div >
<
div id=
"d3" class=
"outer mask" ><
div class=
"inner" ></
div ></
div >
<
script type=
"text/javascript" >
function invalidateMaskedElements()
{
// Shrink border
area , thicken padding
area . Keep ths size of this
// division unchanged.
document.getElementById(
"d1" ).
style .borderWidth =
"5px" ;
document.getElementById(
"d1" ).
style .padding =
"5px" ;
// Shrink padding
area , thicken border
area . Keep ths size of this
// division unchanged.
document.getElementById(
"d2" ).
style .borderWidth =
"5px" ;
document.getElementById(
"d2" ).
style .padding =
"5px" ;
// Shrink border
area , thicken content
area . Keep ths size of this
// division unchanged.
document.getElementById(
"d3" ).
style .width =
"50px" ;
document.getElementById(
"d3" ).
style .height =
"30px" ;
document.getElementById(
"d3" ).
style .borderWidth =
"0px" ;
document.documentElement.removeAttribute(
"class" );
}
document.addEventListener(
"MozReftestInvalidate" ,
invalidateMaskedElements);
</
script >
</
body >
</
html >
Messung V0.5 in Prozent C=99 H=100 G=99
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet am 2026-06-04)
¤
*© Formatika GbR, Deutschland