CSS Opacity Background Color And Text Not Working


Answer :

You should read about rgba



This is the syntax:



 .button {
background-color: rgba(255, 153, 36, 0.5)
}


Here's a Hex-to-RGB Color Converter



You should use rgba() to set the background-color with desired opacity It won't change the text's opacity.



Read more about rgba at CSS3.INFO



.button {
//...
background-color: rgba(255, 153, 36, 0.5);
//...
}


See this DEMO



Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable