喵宅苑 MewoGarden × 技术宅社区II | Z站 Z Station 棒棒哒纯文字二次元技术社区

正文

ie兼容解决方案

作者:sfdfdgfdghtdh
1,ie8 不支持li:first 2,ie8 不支持fadein(); 解决方法:重写fadein() <script type="text/javascript"> jQuery.fn.fadeIn = function(speed, callback) { return this.animate({ opacity: 'show' }, speed, function() { if (jQuery.browser.msie) this.style.removeAttribute('filter'); if (jQuery.isFunction(callback)) callback(); }); }; jQuery.fn.fadeOut = function(speed, callback) { return this.animate({ opacity: 'hide' }, speed, function() { if (jQuery.browser.msie) this.style.removeAttribute('filter'); if (jQuery.isFunction(callback)) callback(); }); }; jQuery.fn.fadeTo = function(speed,to,callback) { return this.animate({ opacity: to }, speed, function() { if (to == 1 && jQuery.browser.msie) this.style.removeAttribute('filter'); if (jQuery.isFunction(callback)) callback(); }); }; </script> 参考资料:http://www.gaoxueping.com/archives/304 3,背景透明,文字不透明的兼容写法: .a{background:rgba(81, 180, 71,0.77); } .a p{color: #FFFFFF;} @media \0screen\,screen\9 {/* 只支持IE6、7、8 */ .a{ background:#51b447; filter:Alpha(opacity=77); *zoom:1; /* 激活IE6、7的haslayout属性,让它读懂Alpha */ } .a p{ position: relative;/* 设置子元素为相对定位,可让子元素不继承Alpha值 */ } } 参考资料:http://www.cnblogs.com/PeunZhang/p/4089894.html

回复

one262616回复给帖子:15938589

作者:one262616
好东西!!正需要!!!
查看回复

围观撒花

作者:wugy315
围观撒花~
查看回复
上一页
下一页
0%
闽ICP备2022013136号闽公网安备35092202000188号
站点地图友情链接:
喵宅苑
喵空间社区程序
喵宅苑 静态版
络合兔
Lanzainc
技术宅
小五四博客
莉可POI
Mithril.js
枫の主题社
Project1
午后少年
机智库
七濑胡桃
xiuno
幻想の日常
魂研社
Nothentai
0xffff
欲望之花
泽泽社长