CSS: Why background-color breaks/removes the box-shadow?

后端 未结 3 623
无人共我
无人共我 2020-12-15 17:59

I have a pretty simple div structure - tree boxes with middle box highlighted with box-shadow:

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-15 18:10

    It has to do with the z-index of the items. Try adding this to your existing css:

    .obOffer {
        position: relative;
        z-index: 10;
    }
    
    .obHiLight {
        position:relative;
        z-index: 100;
    }​
    

提交回复
热议问题