z-index IE8 bug on generated content with :after

后端 未结 4 1610
孤街浪徒
孤街浪徒 2021-02-02 10:48

This is a known error in IE8, look at the last bug here:
http://nicolasgallagher.com/css-typography-experiment/demo/bugs.html

Now, playing a bit with a simple e

4条回答
  •  无人共我
    2021-02-02 11:12

    I use a different method to solve this problem:

    The HTML for each product contains a "sold out" banner that can be positioned over the main image. By default the CSS hides this element. If the wrapping "product" DIV contains a class of "soldOut" the CSS will override the default declaration and display the banner.

    ... product html ...

    CSS:

    .soldOutBanner {
         display:none
    }
    
    .soldOut .soldOutBanner {
        display:block; 
        width:133px;
        height:130px;
        position:absolute;
        top:0px;
        right:0px;
        z-index:10;
        background-image:url(../SoldOut.png);
    }
    

提交回复
热议问题