xr-overlay
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.
This is an experimental technology. The syntax and behavior are still subject to change.
Syntax
/* Usage 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
Limited availability
Since
2020 79% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
83+
83+