Parent div transparent background but not affect child div transparency

后端 未结 2 1046
故里飘歌
故里飘歌 2020-12-04 00:08
some stuff, images etc
.container{ background-colo
2条回答
  •  春和景丽
    2020-12-04 00:15

    The most reasonable solution is:

    .alpha60 {
        /* Fallback for web browsers that doesn't support RGBa */
        background: rgb(0, 0, 0);
        /* RGBa with 0.6 opacity */
        background: rgba(0, 0, 0, 0.6);
        /* For IE 5.5 to 7*/
        filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
        /* For IE 8*/
        -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)"; 
    }
    

提交回复
热议问题