Differences in browser CSS

Source: Internet
Author: User

 

I. CSS selector differences

Difference between IE and FF of a CSS, # popup_container. Alert {}
In IE6, the alert class can only act on the child elements of # popup_container.
The alert class under FF can act on # popup_container and its child elements.

II,Confusion about Z-index in IE

The Z-index attribute is applicable to positioning elements (objects whose position attribute value is relative, absolute, or fixed). It is used to determine that the positioning element is perpendicular to the display (called the Z axis) stack order ).

Each positioning element belongs to a stacking context. The root element forms the root stacking context, while other stacking
Context is generated by the positioning element (the Z-index of this positioning element is defined as a non-auto Z-index value ).
Stacking context is a reference. The same rules are used to determine the cascade order. In addition, stacking context and containing block are not necessarily related.

When the stacking context is the same, the value of Z-index is used to determine how to display it. If the value of Z-index is the same (that is, the stack level is the same ), it is stacked in the back-to-front order.

When either element is stacked with another element that is contained in different stacking context
Level) to determine the display order. That is, in the same stacking
In the context, the order is determined by the Z-index of the stacking context. For example:

The positioning Element A (Z-index: 100) contains the positioning Element A1 (Z-index: 300), while the positioning Element B and the element a sibling relationship (Z-index: 200 ). You will find that no matter how big the Z-index of A1 is, it will be overwritten by B where Z-index is 200, because the Z-index of A is only 100.

 


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.