2016-11-14 IE8 下的 RGBA 兼容问题 问题表述:代码: 问题表述:12background:rgba(0,0,0,.5); /*支持rgba的浏览器*/filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f000000,endColorstr=#7f000000); /*IE8支持*/ 下图为 rgba 和 IE filter 的转换 代码:hack写法:[不直接在样式里面添加filter,而是判断是否为ie添加filter][IE9同时支持RGBA和filter] 123456789<!--[if lt IE 9]> <style type="text/css"> .color-block { background:transparent; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#7f000000,endColorstr=#7f000000); zoom: 1; } </style><![endif]-->