Create non-transparent div on top of transparent parent element

前端 未结 7 1772
渐次进展
渐次进展 2020-12-29 04:35

EDIT: Changed title to actually be correct

I\'m trying to simulate a modal popup in all HTML and CSS and am having a bit of bad luck w

7条回答
  •  攒了一身酷
    2020-12-29 05:09

    A PNG would provide better compatibility (you have to use a filter: statement for IE6) ,but the better CSS3 method is just to use RGBA colours (e.g. background: rgba(0,0,0,0.5); will get you black at 50% alpha), that gets rid of any inherited opacity.

提交回复
热议问题