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 ?
posted on 09.08.2019 at 18:09
0pnshow more
onefiveonefive
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);
posted on 15.08.2019 at 19:52
0pnshow more
TimTim
share on facebookshare on twitter
2019 AnswerTabsTermsContact us
This site uses cookies to improve your experience, for analytics and ads. By continuing to browse this site you agree to our use of cookies.