29 lines
959 B
HTML
29 lines
959 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
html { overflow: hidden; }
|
|
body { margin: 0px; }
|
|
div { height: 100px; width: 100px; }
|
|
.fixed { position: fixed; }
|
|
.green { background-color: green; }
|
|
.red { background-color: red; }
|
|
.composited { -webkit-transform: translateZ(0); }
|
|
</style>
|
|
<script type="text/javascript">
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText(true);
|
|
function moveFixedDiv()
|
|
{
|
|
document.getElementById('fixedDiv').style.top = '200px';
|
|
}
|
|
window.addEventListener('load', moveFixedDiv, false);
|
|
</script>
|
|
</head>
|
|
<body style="height:2000px;">
|
|
<!-- You should see 1 green rectangle in the output and no red. -->
|
|
<div style="top: 200px; left: 100px;" class="fixed red"></div>
|
|
<div class="composited"><div id="fixedDiv" style="top: 500px; left:100px;" class="fixed green"></div></div></div>
|
|
</body>
|
|
</html>
|