What is the function of zoom attribute in css

王林
Release: 2020-03-18 10:44:07
forward
4335 people have browsed it

What is the function of zoom attribute in css

CSS zoom attribute

zoom: Set or retrieve the zoom ratio of the object, trigger the haslayout attribute of the IE browser, and solve some problems such as floating and margin overlap.

Syntax:

zoom:normal

(Recommended tutorial:CSS tutorial)

Parameters:

normal: Use the actual size of the object (default value)
number: Use numbers to define the zoom ratio, no negative numbers,

Example:

zoom:5

percentage: Use percentage to define the zoom ratio, no negative numbers can appear

Example:

zoom:200%

Zoom is a special attribute of IE browser. In the past, Firefox and Google etc. Some other browsers do not support it and have not passed W3C standards. But now this attribute is beginning to be standardized and has appeared in the draft of CSS3.

In addition:

Using the zoom attribute in css can enable the web page to realize the zoom function in IE7.

For example, if you want your web page to be reduced to half of its original size, then add style="zoom:0.5" to the body, such as:

Program code:


        
Copy after login

Recommended related video tutorials:css video tutorial

The above is the detailed content of What is the function of zoom attribute in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!