: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).

/* Usage Example */
video:fullscreen {
  /* Keeps the background black during full-screen video playback */
  background-color: black;
  border: none;
}
Widely available Since 2015 94% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

71+
64+
16.4+
12+
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