CSS - zoom

The zoom CSS Descriptor sets the initial zoom factor of a document defined by @viewport.

Syntax  

CSS
/* Keyword value */
zoom: auto;

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

/* <percentage> values */
zoom: 150%;

Values

auto
The user agent will set the document's initial zoom factor. The user agent may use the size of the area of the canvas on which the document is rendered to find that factor.
<number>
A non-negative number used as zoom factor. A factor of 1.0 means that no zooming is done. Values larger than 1.0 result in a zoomed-in effect and values smaller than that in a zoomed-out effect.
<percentage>
A non-negative percentage value used as a zoom factor. A factor of 100% means that no zooming is done. Values larger than 100% result in a zoomed-in effect and values smaller than that in a zoomed-out effect.

Formal syntax

CSS
auto <a title="Single bar" href="css/value_definition_syntax#single_bar">|</a> <a title="" href="css/number"><number></a> <a title="Single bar" href="css/value_definition_syntax#single_bar">|</a> <a title="" href="css/percentage"><percentage></a>

Description  

The zoom CSS Descriptor sets the initial zoom factor of a document defined by @viewport.

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

Related at-rule@viewport
Initial valueauto
Percentagesthe zoom factor itself
Mediavisual, continuous
Computed valueauto, or a non-negative number or percentage as specified
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? ? ?

 

Specifications  

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

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/css/@viewport/zoom

CSS CSS Descriptor Graphics Layout NeedsBrowserCompatibility NeedsExample Reference Web