xr-overlay
Limited availability78% of usersExperimental
An experimental pseudo-class that targets the root element of a 'DOM Overlay' when a web page is being viewed in an Immersive AR or VR environment.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Firefox or Safari yet, so not every major browser supports it.
See how modern your own CSS is.Check your CSS →
Quick example
:xr-overlay {
/* ensures the UI is readable when overlaid on top of a 3D scene */
background-color: rgba(0, 0, 0, 0.7);
color: white;
}xr-overlay browser support
BaselineLimited availabilityThis feature is not Baseline because it does not work in some of the most widely-used browsers.Not ready for production without a fallback.
Usage78%of people can use this22% use a browser without it.
Browsers
83+
83+Mobile
83+Android