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
09 Aug 2019 at 06:09 PM
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);
0
give a positive ratinggive a negative rating
15 Aug 2019 at 07:52 PM
Tim
Share on FacebookShare on TwitterShare on LinkedInSend email
x
x
2024 AnswerTabsTermsContact us