60 lines
1.3 KiB
HTML
60 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
.container {
|
|
position: absolute;
|
|
width: 300px;
|
|
height: 300px;
|
|
border: 1px solid black;
|
|
}
|
|
|
|
.box {
|
|
position: absolute;
|
|
width: 200px;
|
|
height: 200px;
|
|
}
|
|
|
|
.bottom {
|
|
left: 0px;
|
|
top: 0px;
|
|
background-color: orange;
|
|
}
|
|
|
|
.top {
|
|
left: 100px;
|
|
top: 100px;
|
|
background-color: green;
|
|
animation: fade-out 30ms forwards;
|
|
}
|
|
|
|
@keyframes fade-out {
|
|
0% {
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
z-index: -1;
|
|
opacity: 0.8;
|
|
}
|
|
}
|
|
</style>
|
|
<script>
|
|
if (window.testRunner)
|
|
testRunner.waitUntilDone();
|
|
|
|
window.addEventListener('load', () => {
|
|
document.getElementById('tester').addEventListener('animationend', () => {
|
|
if (window.testRunner)
|
|
testRunner.notifyDone();
|
|
}, false);
|
|
}, false);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="bottom box"></div>
|
|
<div id="tester" class="top box"></div>
|
|
</div>
|
|
</body>
|
|
</html>
|