使IE6、IE7、IE8支持CSS3代码方法

类别:前端设计与创意 | 发布时间:2012-4-24 6:47:43 | 网迅科技  |  阅读次数: 

我们都知道IE6,7并不支持CSS3的属性,IE8也不能很好的支持CSS3。但是有一个小脚本能够做到,它可以让IE支持 CSS3,包括:border-radius (rounded), box-shadow ( shadow), text-shadow等……

.box {
  -moz-border-radius: 15px; /* Firefox */
  -webkit-border-radius: 15px; /* Safari and Chrome */
  border-radius: 15px; /* Opera 10.5+, future browsers, and now also Internet Explorer 6+ using IE-CSS3 */
  -moz-box-shadow: 10px 10px 20px #000; /* Firefox */
  -webkit-box-shadow: 10px 10px 20px #000; /* Safari and Chrome */
  box-shadow: 10px 10px 20px #000; /* Opera 10.5+, future browsers and IE6+ using IE-CSS3 */
  behavior: url(ie-css3.htc); /* This lets IE know to call the script on all elements which get the 'box' class */
}
下载此脚本:http://fetchak.com/ie-css3/ie-css3.htc
 
点击查看详情:http://fetchak.com/ie-css3/

另外也有个CSS3 PIE的小脚本也可以同样让IE6-IE8支持CSS3,原理跟IE-CSS3相似。项目地址:http://css3pie.com/下载地址:http://github.com/lojjic/PIE/downloads
如果你需要一个支持CSS3 的box content,你需要添加一行代码:
behavior: url(ie-css3.htc);
代码:

此文关键字:

在线项目合作

网迅科技结合创新的设计理念与专业技术,为客户制定从策划到创意再到技术的系列支持,帮助企业通过全新的媒体展示平台实现更多价值。如果您喜欢我们的项目,有兴趣合作?请您联系我们,以便我们能够为您提供可行的价值服务。