First, the role of zoom:1 in CSS
In doing IE6, IE7, IE8 browser compatibility, often encounter some problems, you can use Zoom:1 to solve, has the following role:
1, trigger the haslayout of IE browser
2, to solve the floating under IE, margin overlap and some other issues.
Second, Z-index:auto|number;
Auto follows the positioning of its parent object
Number has no unit integer value. Can be a negative number
position
Property in the "Catch up" this display rule is not a compatibility problem, so, to think of an element shown above, directly on the back can be, without z-index.
Flooding is z-index
both a waste of code, and not conducive to later maintenance and acceptance of others, why not throw it away. Remember, this is not the world z-index
.
CSS style, set Z-index to 999 or very large, what does it mean? Z-index is a special property for the display of a Web page. Because the display is a pattern that is shown is a two-dimensional plane, Has the x-axis and y-axis to represent positional properties. In order to represent three-dimensional concepts such as the stacking order of the upper and lower layers of a display element, the Z-index attribute is introduced to represent the difference between Z-axes. Represents the upper and lower three-dimensional relationship of an element in the stacking order. According to the CSS2.1 specification, ' Z-index ' Applies to the anchor element (the ' position ' attribute is not static), it accepts an integer value, and the default value is auto.
It means ' z-index ' only works when the layer has absolute or relative positioning, and ' Z-index ' defaults to Auto.
If 2 or more than 2 of the layers through absolute or relative positioning overlap, this time the value of ' Z-index ' who is the big on the top of that layer display! The purpose of setting a value of 999 or larger than 999 is to ensure that the layer can always be displayed at the top!
The role of Zoom:1 and Z-index in CSS