CSS透明及PNG背景透明处理

CSS透明及PNG背景透明处理

处理层透明问题

.example { /* make the box translucent (80% opaque) */   opacity: 0.8;                    /* Firefox, Safari(WebKit), Opera */   -ms-filter: "alpha(opacity=80)"; /* IE 8 */   filter: alpha(opacity=80);       /* IE 4-7 */   zoom: 1;/* set "zoom", "width" or "height" to trigger "hasLayout" in IE 7 and lower */}

处理PNG图片背景不透明的问题

/*  兼容 IE FireFox */ .seaImg { display:block; width:24px;height:24px; margin-bottom:3px;background:url("../Images/icon/google2.webp") no-repeat left top!important;_filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../Images/icon/google2.webp");background:none; } /* IE */ .seaImg { display:block; width:24px;height:24px; margin-bottom:3px;background-repeat:no-repeat; background-position:center;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=scale, src="../Images/icon/google2.webp"); } /* Firebox */ .creImg { display:block; background-image:url("../Images/icon/insert.webp");width:24px;height:24px; margin-bottom:3px;background-repeat:no-repeat; background-position:center;}

推荐阅读