Set CSS/HTML opacity - transparent background but not text

I need to create a bottom bar with text and transparent background. Transparency is set by CSS opacity function, but it makes transparent the background and also the text inside. Could you please give me advice, how to make the transparent background, but not the text content ?
0
give a positive ratinggive a negative rating
Hi,

To create a bar with transparent background and non-transparent text content, you have to use CSS function background instead of opacity. In the function, you can set the background color in RGB format and also the required opacity from 0.0 to 1.0.

This example will create blue background with 65% opacity:

background: rgba(0,0,255,0.65);
Share on FacebookShare on TwitterShare on LinkedInSend email
1 answer
x
x
2024 AnswerTabsTermsContact us