Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-view-transitions/table-caption.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>View Transitions: Table with captions</title>
<link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
<link rel="match" href="table-caption-ref.html">
<style>
table {
view-transition-name: table;
}
:root::view-transition-group(root) {
opacity: 0;
}
:root::view-transition-group(*) {
animation-play-state: paused;
}
:root::view-transition {
background: pink;
}
</style>
<table>
<caption>Caption</caption>
<tr>
<td>Some row</td>
</tr>
</table>
<script>
onload = () => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.startViewTransition().ready.then(() => {
document.documentElement.classList = "";
});
})
});
}
</script>