When you want to give opacity for border alone usually we
try the following css,
.reduce-border-opacity{
width: 150px;
height: 150px;
border: 5px solid black;
opacity: 0.5;
background-color: grey;
}
The above css will reduce the opacity of the element with
class “reduce-border-opacity” as shown below,
So to reduce the opacity of border alone, give the following css
So to reduce the opacity of border alone, give the following css
.reduce-border-opacity{
width: 150px;
height: 150px;
border: 5px solid rgba(0,0,0,0.5);
background-color: grey;
}
width: 150px;
height: 150px;
border: 5px solid rgba(0,0,0,0.5);
background-color: grey;
}
Give your opacity as the last property in rgba.
Comments
Post a Comment