blob: 9cbac07ae7d820523eddb186f1c03b475cb87775 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Opacity Transitions and Stacking Context</title>
<style type="text/css" media="screen">
.container {
position: relative;
height: 300px;
width: 300px;
margin: 10px;
background-color: green;
-webkit-transition-property: opacity;
-webkit-transition-timing-function: linear;
-webkit-transition-duration: 5s;
}
#first {
opacity: 0.5;
}
.box {
position: absolute;
left: 10px;
top: 10px;
height: 200px;
width: 200px;
background-color: blue;
}
.indicator {
position: absolute;
top: 150px;
left: 150px;
height: 100px;
width: 100px;
background-color: orange;
z-index: -1;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.layoutTestController)
layoutTestController.waitUntilDone();
function runTest()
{
var container = document.getElementById('first');
container.style.opacity = 1;
// dump the tree in the middle of the transition
if (window.layoutTestController) {
if (layoutTestController.pauseTransitionAtTimeOnElementWithId)
window.setTimeout(function() { layoutTestController.pauseTransitionAtTimeOnElementWithId("opacity", 2.5, "first"); layoutTestController.notifyDone(); }, 0);
else
window.setTimeout(function() { layoutTestController.notifyDone(); }, 2500);
}
}
window.addEventListener('load', runTest, false);
</script>
</head>
<body>
<div class="container" id="first">
<div class="box"></div>
<div class="indicator"></div>
</div>
</body>
</html>