5 html { overflow: hidden; }
7 div { height:
100px; width:
100px; }
8 .fixed { position: fixed; }
9 .green { background-color: green; }
10 .red { background-color: red; }
11 .composited { transform: translateZ(
0); }
13 <script type=
"text/javascript">
14 if (window
.testRunner
)
15 testRunner
.dumpAsTextWithPixelResults();
16 function moveFixedDiv()
18 document
.getElementById('fixedDiv').style
.top
= '200px';
20 window
.addEventListener('load', moveFixedDiv
, false);
23 <body style=
"height:2000px;">
24 <!-- You should see 1 green rectangle in the output and no red. -->
25 <div style=
"top: 200px; left: 100px;" class=
"fixed red"></div>
26 <div class=
"composited"><div id=
"fixedDiv" style=
"top: 500px; left:100px;" class=
"fixed green"></div></div></div>