Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/interactive-elements/the-dialog-element/modal-dialog-backdrop-opacity.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="match" href="modal-dialog-backdrop-opacity-ref.html">
<style>
dialog::backdrop {
background-color: rgb(0, 128, 0);
opacity: 0.5;
}
dialog:focus {
outline: none;
}
</style>
<body>
<dialog>Test passes if you see a green backdrop at half opacity.</dialog>
<script>
document.querySelector('dialog').showModal();
</script>
</body>