Should I use PNG transparency or CSS transparency?
My first instinct is to go with CSS. However I heard somewhere that the filter in IE is slow and that I would get
I just did a quick non-scientific test in Firefox 3.0.11 on the mac.
My test was to overlay a div and scroll up and down repeatedly.
One used css:
background: #000; opacity:0.8;
The other used a 10px 24bit PNG of the same.
I measured the following results with Activity monitor (so guessing,not exact)
Firefox 3.0.11
CSS opacity: approximately 60% cpu usage.
PNG: approximately 20% cpu usage.
Safari 4.0:
CSS opacity: approximately 80% (with peaks of 120%!)
PNG: approximately 76% (with no peaks at all)
So as far as performance goes, it seems like a PNG is the winner.