This question already has an answer here: 这个问题已经在这里有了答案: this
I am using something similar to the following code: 我正在使用相似于如下代码的内容: url
<div style="opacity:0.4; background-image:url(...);"> <div style="opacity:1.0;"> Text </div> </div>
I expected this to make the background have an opacity of 0.4 and the text to have 100% opacity. 我但愿这能够使背景的不透明度为0.4,文本的不透明度为100%。 Instead they both have an opacity of 0.4. 相反,它们都具备0.4的不透明度。 spa