【发布时间】:2019-02-01 23:18:24
【问题描述】:
以这段代码为例
#backgroundimage {
background: url("https://www.solidbackgrounds.com/images/640x480/640x480-aero-solid-color-background.jpg");
height: 50px
}
#container {
background-color: #4C4C4C;
opacity: 0.5;
}
#text {
color: #ffffff;
opacity: 1;
}
<div id="backgroundimage">
<div id="container">
<p id="text">
Some text here
</p>
</div>
</div>
我想让文本颜色为白色,同时保持背景图像和容器不透明度不变。
【问题讨论】: