Thursday, January 31, 2008

CSS PNG Transparency

This sample provides a CSS class that fills a background of an element with a semi-transparent PNG. This one does a shadow-fading effect along a horizontally stretched DIV or TD:


/* Tested in IE6, IE7, Safari and FF. */
.fade-down-white {
background: transparent url(images/fade_down_white.png) top repeat-x;
height: 50px;
width: 100%;
_background: none;
_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/fade_down_white.png',
sizingMethod='scale');
}

No comments:

Post a Comment