Reputation: 37
Css:
#container
{
position:relative;
left: 28%;
width: 50%;
height: 100%;
background: black;
opacity:0.7;
}
Html:
<div id="container">
Here are texts,images,etc
</div>
I cant think of a way to make transparent just the div color without affecting the content of #container.Someone know one?
Upvotes: 0
Views: 208
Reputation: 4268
background-color: rgba(150,150,150,Val between 0 and 1);
RGBA
stands for red green blue alpha
. The value of alpha
is used to determine the intensity of the transparency. 0
being fully transparent and 1
being fully opaque.
Upvotes: 1