Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

:picture-in-picture — picture-in-picture state

The :picture-in-picture pseudo-class matches an element whose contents appear in an overlaid picture-in-picture window. It styles the element in the document, not the window itself.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

video:picture-in-picture { outline: 4px solid orange; }

:picture-in-picture represents an element whose contents appear in a window occupying part of the screen and overlaying other content, rather than embedded in the document.

This pseudo-class takes no arguments. video:picture-in-picture targets the video element’s box in the document, not the picture-in-picture window. It does not activate this mode.

The example declares a gray outline, changed to orange while matching. It is illustrative: CSS alone supplies neither video nor a way to activate the mode. Verify support and behavior in the target browser.

Examples

video {
  outline: 4px solid gray;
}

video:picture-in-picture {
  outline-color: orange;
}

Result

Outside picture-in-picture: gray outline. While matching :picture-in-picture: orange outline on the video element's box in the document.

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources