I want to get rgba backgrounds working with all browsers. I did some searching and found out that generally there are three types of browsers out there:
1) Browsers that support rgba.
2) Internet Explorer that supports rgba via bizarre '-ms-filter' thing.
3) Browsers that do not support rgba, but I could use base64 png images with 'data URI scheme'. (Even when browser does not support URI scheme, according to this it still could be done.)
I have no problems with rgba supporting browsers, and I can get it working with IE, but problem is that I have no idea how to generate client side base64 png images for URI scheme. I really do not want to pregenerate png files, because my rgba values are not constant. I could go with dynamic png generation with php gd library, but I'd really like to do all this on client side. So I'd like to know, is there any good way out there for generating semi-transparent png images with java-script. After this I could just base64 encode them and use them with URI scheme?
Thank you.
Edit:
I want to have semi-transparent div background, while having content fully visible.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…