Answers for "css background image opacity rgba"

CSS
12

css how to make background transparent

/* Use RGBA */
background-color: rgba(255, 255, 0, 0.75); /* Transparent Yellow */
Posted by: Guest on September-29-2020
4

set background image opacity

#bg{
background-image: url('images/wood1.jpg');
opacity:0.2;
width:300px;
height:300px;
}
Posted by: Guest on October-16-2020
1

background image opacity css

/* Two ways to make images opaque */

div {
	background-color : rgba(120, 120, 120, 0.5) 
   	/* the 0.5 is the value of opacity on a scale of 0-1 */
}

/* OR */

div {
	background-color : blue
    opacity : 50%
}
Posted by: Guest on November-25-2020
-2

have a transparent div on an image html

<html>
  <head>
    <style type="text/css">
      div.imageSub { position: relative; }
      div.imageSub img { z-index: 1; }
      div.imageSub div {
        position: absolute;
        left: 15%;
        right: 15%;
        bottom: 0;
        padding: 4px;
        height: 16px;
        line-height: 16px;
        text-align: center;
        overflow: hidden;
      }
      div.imageSub div.blackbg {
        z-index: 2;
        background-color: #000;
        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
        filter: alpha(opacity=50);
        opacity: 0.5;
      }
      div.imageSub div.label {
        z-index: 3;
        color: white;
      }
    </style>
  </head>
    <body>
      <div class="imageSub" style="width: 300px;"> <!-- Put Your Image Width -->
        <img src="image.jpg" alt="Something" />
        <div class="blackbg"></div>
        <div class="label">Label Goes Here</div>
      </div>
    </body>
</html>
Posted by: Guest on August-25-2020

Code answers related to "css background image opacity rgba"

Browse Popular Code Answers by Language