:fullscreen

Targets an element while it is being displayed in the browser's full-screen mode (e.g., when a video or a photo is expanded to fill the whole monitor).

Quick example

video:fullscreen {
  /* Keeps the background black during full-screen video playback */
  background-color: black;
  border: none;
}

:fullscreen Browser Support

Limited availability94% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Not ready for production without a fallback.

71+
64+
16.4+
79+
ESC