For this question, let “efficiency” mean more or less page rendering speed. Although we must also consider performance issues such as smooth scrolling.
Say you put a striped background on a page. In terms of efficiency, is it better to draw an image 100 pixels wide (showing ten stripes) or an image 20 pixels wide (showing two stripes)? Of course ... a large image takes longer to load, but I feel that I have run into difficulties processing very small images. Is there an optimal point?
I'm starting to think that this depends on the browser (and possibly on the operating system?), Especially considering the second part of this question:
To achieve transparency, are you more efficient at writing a transparent .png file or working with CSS opacity attributes (again, the question arises of large or small tiles)? In my experience, older versions of IE seem to behave better with tiled, translucent .png than with CSS opacity attributes (although I have never done any scientific testing).
Rounded corners are another good example ... in some browsers, using images instead of CSS attributes or JavaScript implementations seems to make the page much faster with smoother scrolling.
This is really a broader issue than CSS, but this is what I’ve been thinking about lately.
-Peter
Peter source share