Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report