blob: 75d6d48b7282a6d54734731a3983b9da626cbd73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<!DOCTYPE html>
<style>
#target {
transition: opacity 10ms;
opacity: 0.5;
}
#target.dim {
opacity: 0.2;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
window.addEventListener('load', function() {
requestAnimationFrame(function() {
requestAnimationFrame(function() {
var target = document.getElementById('target');
target.classList.remove('dim');
target.addEventListener('transitionend', function() {
requestAnimationFrame(function() {
requestAnimationFrame(function() {
if (window.testRunner)
testRunner.notifyDone();
});
});
});
});
});
});
</script>
<div id="target" class="dim" style="width: 500px; height: 500px; background-color: blue;"></div>
<div style="width: 300px; height: 300px; position: absolute; left: 20px; top: 400px; background-color: purple; z-index:1000">
<div style="width:100px; height:100px; position:relative; left:10px; top:10px; transform:translateZ(0); background-color:yellow"></div>
</div>
|