htmlcssbackground-color

Why is the font color not visible in this inline CSS formatting?


I expected to see a white font, but everything is blue. Why does this happen?

<p style="color:rgba(0, 0, 255, 0.0); background-color: rgba(0, 0, 255, 1.0);">
   Hello, World!
</p>

I tried running this on the Liveweave website.


Solution

  • Because the last 0 of the css color:rgba(0, 0, 255, 0.0) mean "transparent". if you want to set font color to white you need to set CSS to color:rgba(255, 255, 255, 1.0)