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.

/* 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;
}
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+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC