how to handle 'double opacity' of two overlapping divs

前端 未结 5 1163
时光取名叫无心
时光取名叫无心 2021-01-23 16:19

I have two divs, both with 0.6 opacity. I need them to overlap but retain their opacity and not create a new combined opacity level. I can\'t use an image.

EDIT -- The

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-23 17:01

    How about this: http://jsfiddle.net/rudiedirkx/TqRCw/

    (Dabble's editor sucks!!)

    It can't be done with only pseudo elements sadly =(

    It can be done with only pseudo elements! See pixelass' answer. CSS3 is a requirement though.

提交回复
热议问题