blob: 8a61cdcaa462a22dc39353fd04f15d969e21159b (
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
36
37
38
39
|
<!DOCTYPE HTML>
<html class="reftest-wait">
<title>In visibility hidden color animation on pseudo element</title>
<style>
@keyframes color {
0% { color: black }
1% { color: blue }
100% { color: blue }
}
div::marker {
visibility: visible;
content: "Color Animation";
animation: color 0.1s 1 forwards;
}
div {
color: black;
visibility: hidden;
display: list-item;
list-style-position: inside;
}
</style>
<div id="target">color animation on visible pseudo element attached to invisible element</div>
<script>
document.getElementById("target").addEventListener("animationend", AnimationEndListener);
function AnimationEndListener(event) {
setTimeout(RemoveReftestWait, 0);
}
function RemoveReftestWait() {
document.documentElement.classList.remove("reftest-wait");
}
</script>
|