Uncategorized
Nov25

>CSS Transparency Settings for All Browsers

0 comment

>Transparency is one of those CSS backdrop that has a awe-inspiring history and requires lots of altered backdrop and ethics to ensure cantankerous browser affinity that goes aback as far as you can. To awning all your bases, you charge a agglomeration of CSS statements. Fortunately they don’t baffle with anniversary other, so application them all every time you ambition to add accuracy is no big altercation and worry-free. Here they are, and are currently set to 20% transparency:

.transparent {
/* Required for IE 5, 6, 7 */
/* …or something to trigger hasLayout, like zoom: 1; */
width: 100%;

/* Theoretically for IE 8 & 9 (more valid) */
/* …but not required as filter works too */
/* should come BEFORE filter */
-ms-filter:”progid:DXImageTransform.Microsoft.Alpha(Opacity=30)”;
/* This works in IE 8 & 9 too */
/* … but also 5, 6, 7 */
filter: alpha(opacity=30);
/* Older than Firefox 0.9 */
-moz-opacity:0.3;
/* Safari 1.x (pre WebKit!) */
-khtml-opacity: 0.3;
/* Modern!
/* Firefox 0.9+, Safari 2?, Chrome any?
/* Opera 9+, IE 9+ */
opacity: 0.3;
zoom: 1;
filter: alpha(opacity=30);
opacity: 0.3;
}

Author: 

author