What is the difference between opacity and that through alpha channel (rgba)?

Sreehari K M picture Sreehari K M · Jan 10, 2013 · Viewed 12.5k times · Source
div { background-color: rgb(255,0,0); opacity: 1; }

div { background-color: rgba(255,0,0,1); }

What is the difference between the above two?

Answer

Krishnaprasad Varma picture Krishnaprasad Varma · Jan 10, 2013

Opacity sets the opacity value for an element and all of its children; While RGBA sets the opacity value only for a single declaration.

This is well explained here. http://www.css3.info/introduction-opacity-rgba/