CSS Zoom: Zoom property in CSS extents the content. This property controls the content’s level of magnification. Rather than the use of this CSS property, we may also apply the CSS property, i.e., transform: scale();.

The usage of the zoom property is not suggested because this property does not provide its support in a few browsers. The zoom CSS property is not a standard aspect, which is advised not to apply over production sites. Initially, it was implemented inside the IE browser.

Syntax:

Zoom property in CSS provides its support for the values as above-mentioned, which are explained below.

normal: It displays the component to its size as normal. It specifies the general size of any component. It takes the general contents that do not zoom-in or zoom-out. It has value, i.e., zoom:1;

number: This property defines any positive value and illustrates any zoom factor. It contains values which are larger than value 1.0 depict zoom in (size increment), and smaller than value 1.0 depict zoom out (size reduction). Suppose we describe zoom: 1.5; after that, any content will 1.5 times greater than any original content.

percentage: It displays the values in percentage. In this, a 100% value is equal to its normal value. It extents any content with the use of any percentage value. It contains values that are larger than 100% depict zoom in (size increment), and smaller than 100% depict zoom out (size reduction). Suppose we describe zoom: 175%; after that, any content will 175% times greater than any original content.

Let’s understand this CSS property with the help of the following examples, which are discussed below.

Example1:

Output:

CSS Zoom

Example2:

Output:

CSS Zoom

Pin It on Pinterest

Share This