blob: 25a199968c46317fcc4b0d1ba6ccf6e7a7d16fac [file] [log] [blame]
<style>
.parent {
position: relative;
background-color: black;
width: 100px;
height: 100px;
}
.child {
background-color: red;
width: 100px;
height: 100px;
}
</style>
<div class=parent>
<div class=child>
</div>
</div>
<div class=parent>
<div>
<div class=child>
</div>
</div>
</div>
<script>
document.body.offsetTop;
if (window.testRunner)
testRunner.display();
var children = document.getElementsByClassName("child");
children[0].style.backgroundColor = "rgba(0,255,0,0.5)";
children[1].style.backgroundColor = "rgba(0,255,0,0.5)";
</script>