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