CSS背景不透明度[重复]

北战南征 提交于 2020-05-08 03:44:07

问题:

This question already has an answer here: 这个问题已经在这里有了答案:

I am using something similar to the following code: 我正在使用类似于以下代码的内容:

<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的不透明度。


解决方案:

参考一: https://stackoom.com/question/hjU5/CSS背景不透明度-重复
参考二: https://oldbug.net/q/hjU5/CSS-Background-Opacity-duplicate
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!