joseph.glover
0
Q:

opacity css

.opacity30 {
  opacity: 0.3;
  filter: alpha(opacity=30); /* For IE8 and earlier */
}
13
.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
h1 {background-color:rgba(255,0,0,0.3);}
2
div {
  background-color: yellow;
}

.light {
  opacity: 0.2; /* Der Text kann kaum über dem Hintergrund gelesen werden */
}

.medium {
  opacity: 0.5; /* Der Text ist besser über dem Hintergrund lesbar */
}

.heavy {
  opacity: 0.9; /* Der Text ist sehr deutlich über dem Hintergrund lesbar */
}
0
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