Nontransparent child in transparent parent

前端 未结 2 715
死守一世寂寞
死守一世寂寞 2021-01-22 00:56

I have transparent div-block in html. There is another child blocks in it. Is it possible to make that child divs untransparent?

2条回答
  •  情歌与酒
    2021-01-22 01:46

    No, it isn't possible. But in case you're merely looking for a transparent background, you can set the background-color using the rgba(RRR, GGG, BBB, AAA) construct, in which the last number is the alpha transparency value. It only works in modern browsers though.

提交回复
热议问题