Aakash Parida
10
Q:

background opacity css

.opacity30 {
  opacity: 0.3;
  filter: alpha(opacity=30); /* For IE8 and earlier */
}
13
/*fake background opacity css */
<div style="background-color:rgba(0, 0, 0, 0.5);">
   <div>
      Text added.
   </div>
</div>
0
.div{
  opacity: 0.8; /* 1 means fully visible, 0 means invisible */
}
4
background: rgba(255, 255, 255, 0.25);
0
img {
  opacity: 0.5;
}
0
/*
  You have to fake it, as there is no such property
*/

div {
  width: 200px;  /* Image Width */
  height: 200px; /* Image Height */
  display: block;
  position: relative;
}

div::after {
  content: "";
  background: url(image.jpg);
  opacity: 0.5;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;   
}
5
h1 {background-color:rgba(255,0,0,0.3);}
2
div {
  width: 200px;
  height: 200px;
  display: block;
  position: relative;
}

div::after {
  content: "";
  background: url(image.jpg);
  opacity: 0.5;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;   
}
1
The following example sets the opacity for the background color and not the text: 100% opacity. 60% opacity. 30% opacity. 10% opacity. You learned from our ...
1

img {
  opacity: 0.5;
} 
0

New to Communities?

Join the community