如何用不透明度改变div中单个元素的不透明度?我把这个div称为“圆圈”
.circle{
width: 64px;
height: 64px;
opacity: 0.2;
border-radius: 32px;
margin: 10px;
}
这个div里面有一个带有facebook徽标的div。问题是我不知道如何更改facebook徽标的不透明度或完全关闭此元素的不透明度。
为了只为其中一个更改它,您可以为该元素提供一个类'FBlogo',并为具有circle和FBlogo类的项应用不透明度。所以你会的
.circle{
width: 64px;
height: 64px;
opacity: 0.2;
border-radius: 32px;
margin: 10px;
}
.circle.FBlogo{
opacity: //your value;
}