CSS Zoom Properties

Source: Internet
Author: User

CSS in the Zoom property is introduced in fact the Zoom property is the exclusive properties of IE browser, Firefox and other browsers do not support. It can set or retrieve the scale of an object. In addition, it has other minor influences, such as triggering IE's Haslayout property, clearing the float, clearing the margin overlap, and so on. Application of zoom: Zoom:normal | Number normal: Default value. Actual size of the applied object number: percent | Unsigned floating-point real number. A floating-point real value of 1.0 or a percentage of 100% is equivalent to the normal value of this property in the vernacular is the zoom: The following number is the magnification multiplier, so the value, but also the percentage. such as: zoom:1,zoom:120%. And this property as long as in IE in the impact, so very rarely used to its practical use, and most often use the impact is clear floating, such as: Copy code code as follows:. border{border:1px solid #ccc; padding:2px; overflow:hidden ; _zoom:1; } _zoom is a project group in which the CSS hack secondary School has an impact on IE6. The IE6 browser will perform the zoom:1 of the implied object, but here Overflow:hidden; and _zoom:1; is connected to the use of the effect is to clear the border internal floating. Similarly, you can also apply the same method to clear the margin attribute in IE browser overlap topic. CSS in zoom:1 compatibility IE6, IE7, IE8 Browser, often encounter some problems, you can apply zoom:1 to solve, has the following impact: Trigger IE browser haslayout to solve the floating, margin overlap and other topics. For example, the site application div to do a row of two columns of display, HTML code: Copy code code as follows:

Featured Articles
    • CSS Library Bar
    • original </a>

CSS code: Copy Code as follows:. h_mainbox {border:1px solid #dadada; padding:4px 15px; Background:url (.. /mainbox_bg.gif) 0 1px repeat-x; margin-bottom:6px; Overflow:hidden}. h_mainbox h2 {font-size:12px; height:30px; line-height:30px; border-bottom:1px solid #ccc; color:#555 ;} . H_mainbox H2 span {float:right; font-weight:normal;}. h_mainbox ul {padding:6px 0px; background:#fff;}. mainlist {over Flow:auto; Zoom:1;} . h_mainbox li {width:268px; float:left; height:24px; overflow:hidden; Background:url (...) /icon3.gif) 0 6px no-repeat; padding:0px 5px 0px 18px; line-height:200%;} Mainlist inside the zoom:1 side can be in IE6, IE7, IE8 normal display results. CSS in the impact of Zoom 1, check the page label is closed do not underestimate this, perhaps tossing you two days have not solved the CSS BUG problem, but only from here. After all, the template of the results page is usually created by nesting, and they easily make such a problem.   Quick tip: You can open a file with Dreamweaver, usually no closed label, yellow Patron highlighted.   2, Style elimination method Some jumbled pages may have loaded N external chain CSS files, then delete the CSS file one by one, find the specific CSS file triggered by the BUG, narrow the limitations of the lock.   For the title of the CSS style file that was just locked, row by line delete the specific style definition, navigate to the specific trigger style definition, even the specific trigger style properties. 3, module Confirmation method we can also start from the HTML element of the page.   Remove the HTML module from the page to find the HTML module that triggered the problem. 4, check whether to clear floating actually have a lot of CSS BUG problemDue to the lack of clear float.   It is necessary to develop an outstanding habit of clearing floating, and it is recommended to apply the method of removing floating without additional HTML tags (as far as possible to avoid the use of overflow:hidden;zoom:1 similar way to clear the float, there are too many restrictions). 5, check IE whether trigger haslayout a lot of ie under the jumbled CSS BUG is unique with IE haslayout each other dry note. Be familiar with and understand haslayout to deal with the penalty jumbled CSS BUG will do more. Recommended browse OLD9 translation of the "On Have layout" (if you cannot climb through the huge GFW, you can browse the blue reprint) Quick tip: If the Debug object that triggered the Haslayout,ie will be displayed in the properties of IE Developer Toolbar   The Haslayout value is-1. 6, the Border Patron debugging method the name Incredibles is to set the element prominent border or patron (generally black or red), for debugging. This approach is one of the most common ways to debug CSS bugs and is still useful for jumbled bugs. Affordable also environmentally friendly ^ ^ finally want to exaggerate the point is that the formation of outstanding writing habits, cut extra tags, as far as possible semantics, appropriate standards, actually can think we cut a lot of extra jumbled CSS BUG, more time is actually we ourselves to build a trouble. Desire you to get out of the BUG, life is getting better. SOURCE reference: http://www.jb51.net/css/40285.html Copy Code

CSS Zoom Properties

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.