37 lines
787 B
HTML
37 lines
787 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>This tests that we position composited content properly when they are clipped to the viewport.</title>
|
|
<style>
|
|
.jiggle {
|
|
width: 20px;
|
|
height: 5px;
|
|
position: absolute;
|
|
background: green;
|
|
}
|
|
|
|
.overlapping {
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
width: 10px;
|
|
height: 300px;
|
|
-webkit-transform: translateZ(0);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class=overlapping></div>
|
|
<script>
|
|
var leftPos = 0;
|
|
for (i = 0; i < 50; ++i) {
|
|
var element = document.createElement("div");
|
|
element.className = "jiggle";
|
|
element.style.top = (6 * i) + "px";
|
|
element.style.left = leftPos + "px";
|
|
document.body.appendChild(element);
|
|
leftPos -= 0.1;
|
|
}
|
|
</script>
|
|
</html>
|