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

Contact

604-309-8713
info@solidfoundationwebdev.com

Send Me A Message

I would love to get in touch and talk about your next project. Feel free to send a message and I will get back to you shortly.

Get Connected