gregdoolittle.com

alpha transparency

January 25th, 2007

i learned a neat CSS workaround at work the other day. no more fudging it with PNG’s that don’t even work on IE6… thanks justine!

.transparent {
	opacity: 0.8; /* CSS3 */
	-moz-opacity:0.8; /* Firefox */
	filter:alpha(opacity=80);  /* IE6 */
}

then apply it to whatever you want:

<h1 class="transparent">this text will be big and transparent!

<img src=”./images/overlay.gif” class=”transparent” />

happy css-ing!

Powered by WordPress