.opacity30 { opacity: 0.3; filter: alpha(opacity=30); /* For IE8 and earlier */ }
/*fake background opacity css */ <div style="background-color:rgba(0, 0, 0, 0.5);"> <div> Text added. </div> </div>
/* Use RGBA */ background-color: rgba(255, 255, 0, 0.75); /* Transparent Yellow */
html,body { background-color: red; }
background: rgba(255, 255, 255, 0.25);
img { opacity: 0.5; }
body { background: #ffffff url("img_tree.png") no-repeat fixed right top; }
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; }
div { opacity:25% ; }
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 ...