Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use zoom in the proprietary css property of IE browser

Shulou Source: shulou.com Published: 2022-06-03 14:16:27 09月12日 Update

This article will explain in detail how to use zoom in the proprietary css attributes of IE browsers. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Zoom:1; is generally used to solve the problem that the parent element does not automatically expand when the child element of IE6 floats. The function is equivalent to overflow:auto, and height:1% can also be used instead of zoom:1.

So it is common to add overflow:auto;zoom:1; to the parent element of the floating element. In this way, the child element floats, and the parent element no longer automatically expands with the child element.

How to use Zoom:

The code is as follows:

Zoom: "normal" | number

Normal: default value. Use the actual size of the object

Number: percentage | unsigned floating point real number. When the floating point real value is 1.0 or the percentage is 100%, the normal value of this attribute is explained in vernacular as zoom: the following number is the multiple of magnification, which can be a number or a percentage. Such as: zoom:1,zoom:120%. This property only works in IE, so it is rarely used for practical use, but it is most often used to clear floats, such as:

The code is as follows:

.border {border:1px solid # CCC;padding:2px;overflow:hidden;_zoom:1;}

_ zoom is the part of CSS hack technical secondary school that works on IE6. The IE6 browser executes zoom:1 to represent the scaling of the object, but here

Overflow:hidden; and _ zoom:1; are used together to clear the internal floats of the border.

In the same way, you can use the same method to clean up the overlap of margin attributes in IE browsers.

This is the end of the use of zoom in the proprietary css properties of IE browsers. I hope the above content can be of some help and learn more. If you think the article is good, you can share it for more people to see.

Tags: Elements attributes floats methods browsers actions usage percentages proprietary code content actual objects values articles more floating points percentages knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Shulou Technology MySQL Docker Xiaomi