CSS Positioning Z-index problem

Source: Internet
Author: User
  1. Some browsers under the level of the element to cover the existence of bugs;

    The z-index of an element is too large to be obscured at all times;

    JS dynamic calculation Z-index, resulting in the element coverage Relationship Department controllable

    vc+hozxicj4kpgjypgo8yni+cmzml2nocm9tzsb6lwluzgv4ielfni83ielfoc85idxicj4ksrvj6nbdicawicbhdxrvicbhdxrvica8yni+ cm51bwjlciagbnvtymvyicbudw1izxigig51bwjlciagpgjypgo8yni+cjxicj4ksuo8trnyz7w1xlhivc+jujxicj4kpgjypgrpyl+ 0vli1473hwtujujxicj4kpgjypgoxlic21npazay8ttsqy9ijrmssym8ou/jwb3npdglvbjpzdgf0awmpx+m/9s/ czss1tch3uvpd5rxe1krl2lvhulk4x8eww+a1xds8yni+ cjxicj4kmi4gtttt2s2svlbuqsvyo6xwb3npdglvbrk7zqpzdgf0awph0notaw5kzxi05ttatcth6b/ 2z8j6lwluzgv4tpo1xnsqy9i74biyumd6lwluzgv40kg1xnsqy9ijrly0ei1pbmrlens9tpptxc/ ivlbuvbjfozxicj4kpgjypgozlibjrtyvn8/ Ccg9zaxrpb26yu86qc3rhdgljo6zh0notaw5kzxiyu7tm1nrksxotaw5kzxjoqjcjrlp9tmvwrs3itctkr8daxvd6lwluzgv4zqphdxrvpgjypgo8yni +cjquihotaw5kzxjoqmf1dg+1xnsqy9iyu7lo0+uy47y2udjptbxesci9z6os08np8snpsena+ tbbtmvh0notaw5kzxiyu86qyxv0b7xe1krl2mc0ss7t67hivc+hozxicj4kpgjypgru2snpw+yyteo94clbtcs7+bshyc+jrm7sw8fs/ cjrobc2qm67yvehssi3x3czy7nzt720yrvjkbxeumxe7sc01/ay47y2tcsxyl3poam8yni+cjxicj4k1nq2qm67yvfv4rj2umxe7s/ co6zkr8daxvfu2utwyl5kb2292rxjyrgjrlp9wcvj+rpjzg9tyvfwrs3io6y7ubvhupm+3wrvbcr31tc1xlaozrvuqsvykhbvc2l0aw9usrvoqnn0yxrpyynj+ rpjobc2qm67yvehsao6pgjypgpkb23k96gitqjou8r3ttsxymjnz8ioxutw0lhfyc/t0lrsyavussimtcsx7cq+ Umpuqsvycg9zaxrpb26yu86qc3rhdgljkao6pgjypgogidxicj4kpgltzybzcmm9 "http://www.2cto.com/uploadfile/Collfiles/ 20140321/20140321125539169.png "alt=" \ ">


    It can be understood that the location tree contains all the elements in the DOM tree that are not position staitc. Non-sibling element comparison hierarchies can be compared in this way:

    1. Traverse the parent node of the anchor tree up to 2 elements as sibling elements.

    2. The final comparison is based on the above conclusions. The higher-level elements will be closer to the user's monitor and can cover low-level elements.


    Example one: Assume that all red elements position are not static, and z-index=1, according to the above comparison rules can be known:

    1. C > (b && b *) > (a && A *) is the element C and C of all positioning element levels higher than A, b

    2. M > H, g > K, D > m

    Example two: Suppose that the position of a does not exist for the Static,z-index attribute, the child elements of a in the location tree Z-index once for 1,2,3,4 ... other positioning elements z-index:1:

    1. According to conclusion three: Ie6/7 B > (a && A *) that is, the level of element B is higher than the level of all positioning elements of a and a, other browsers: i > H > B > D reprint please indicate the source: CSS positioning z-index problem

  • 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.