1
我试图让外部元素具有不透明的影响,并使内部元素保持不变。我尝试使用重要的,但没有奏效。这里是我的代码我怎样才能让它的相似风格只影响外部元素而不是内部元素
<h1 id="outer"><div id="inner">Planet</div></h1>
和CSS
#outer{
background-color: black;
opacity: 0.8;
}
#inner{
color: white !important;
}
什么是正确的语法这个工作?
该诀窍试图接受你的答案,但我不得不改变外部背景颜色的透明度等待8分钟 – nothingness
很高兴听到它:) – Pixelomo
完成。谢谢你的CSS技巧链接教会了我很多 – nothingness