What is the function of zoom: 1 in CSS? What is the function of CSS zoom?

Source: Internet
Author: User

What is the function of zoom: 1 in CSS? What is the function of CSS zoom?

What is the role of zoom: 1 in CSS:
Suggestion: writing code as much as possible can effectively improve learning efficiency and depth.
The zoom attribute is used to set the object's zoom function and has browser compatibility issues. Firefox and operabrowser do not support this attribute. However, these are not the content described in this chapter. This chapter mainly introduces some special usage of this attribute. Let's take a look at a code example:

<! DOCTYPE html> 

The code above causes the parent element to collapse because the child element is floating, that is, the parent element is not supported by the quilt element. Of course, you can use the clear floating to solve this problem. The code is modified as follows:

<! DOCTYPE html> 

The above Code adds overflow: hidden to the parent element to clear the floating, and the parent element is opened. However, IE6 does not support using overflow to clear the floating, so you can use zoom: 1 to solve this problem, the code is modified as follows:

<! DOCTYPE html> 

The preceding code is compatible with the IE 6 browser. The principle is that the haslayout attribute can be activated when zoom: 1 is applied to the element in IE6, that is, the attribute value is set to true, at this time, this element has a layout, so that it can be closed and floating, so that the parent element will not be unopened.

The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 3371.

For more information, see: http://www.softwhy.com/shili/

Related Article

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.