How To Change Opacity Of Background Color But Not Content Using CSS

Posted by Weston Ganger

When you need to change only the color of the background of an element you can use CSS’ rgba.


.my-element{
  /*  black with opacity of 0.6 */ 
  background-color: rgba(0, 0, 0, 0.6);
}


Related External Links:

Article Topic:Software Development - HTML / CSS

Date:January 03, 2016

Recommended Posts