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

530 Valid Hostname Is Expected When Setting Up IIS 10 For Multiple Sites

C Perror Example

Converting A String To Int In Groovy