max-zoom

The max-zoom CSS descriptor sets the maximum zoom factor of a document defined by the @viewport at-rule. The browser will not zoom in any further than this, whether automatically or at the user's request.

A zoom factor of 1.0 or 100% corresponds to no zooming. Larger values are zoomed in. Smaller values are zoomed out.

Syntax

/* Keyword value */
max-zoom: auto;

/* <number> values */
max-zoom: 0.8;
max-zoom: 2.0;

/* <percentage> value */
max-zoom: 150%;

Values

auto
The user agent will set the document's upper zoom factor limit.
<number>
A non-negative number limiting the maximum value of the zoom factor.
<percentage>
A non-negative percentage limiting the maximum value of the zoom factor.

Formal definition

Related at-rule@viewport
Initial valueauto
Percentagesthe zoom factor itself
Computed valueauto, or a non-negative number or percentage as specified

Formal syntax

auto | <number> | <percentage>

Examples

Setting max-zoom

@viewport {
  max-zoom: 1.5;
}

Specifications

Specification Status Comment
CSS Device Adaptation
The definition of '"max-zoom" descriptor' in that specification.
Working Draft Initial definition

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
max-zoom descriptorChrome No support 29 — 84Edge Full support 12
Prefixed
Full support 12
Prefixed
Prefixed Implemented with the vendor prefix: -ms-
Firefox No support NoIE Full support 10
Prefixed
Full support 10
Prefixed
Prefixed Implemented with the vendor prefix: -ms-
Opera Full support 16Safari No support NoWebView Android No support NoChrome Android No support 29 — 84Firefox Android No support NoOpera Android Full support 16Safari iOS No support NoSamsung Internet Android Full support 2.0

Legend

Full support
Full support
No support
No support
Requires a vendor prefix or different name for use.
Requires a vendor prefix or different name for use.

See also