兼容IE透明度,IE7以及以下版本不加载

来源:互联网 发布:linux 参数是引用类型 编辑:程序博客网 时间:2024/06/11 05:23
.focusBox .next:hover { filter:alpha(opacity=50) !important;opacity:0.5 !important;  }
filter:alpha(opacity=50) !important;是针对于IE浏览器兼容
opacoty:0.5;
建议两个都写上
js里边写下边的内容
var DEFAULT_VERSION = 7.0;var ua = navigator.userAgent.toLowerCase();var isIE = ua.indexOf("msie")>-1;var safariVersion;if(isIE){    safariVersion =  ua.match(/msie ([\d.]+)/)[1];}if(safariVersion <= DEFAULT_VERSION ){    // 进行你所要的操作alert("您当前的浏览器版本过于低,存在安全风险,建议升级浏览器!");document.execCommand("stop");}

原创粉丝点击