让IE6/IE7/IE8支持CSS3属性的脚本ie-css3.htc

IE6/7并不支持CSS3的属性,IE8也不能很好的支持CSS3。如何让IE 6/7/8支持border-radius (rounded),box-shadow ( shadow),text-shadow等这些属性呢?这里介绍一个通过htc脚本实现这些属性的方法。

首先下载ie-css3.htc脚本,然后在css中加入:

behavior: url(ie-css3.htc);例如:

.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 */
}注意:behavior: url(ie-css3.htc) 中的ie-css3.htc地址用绝对路径或者直接传到网站的根目录下面,要不然可能会看不到效果。

官网下载:http://fetchak.com/ie-css3/


http://www.webdesignba.com/2011/10/20/%E8%AE%A9ie6ie7ie8%E6%94%AF%E6%8C%81css3%E5%B1%9E%E6%80%A7%E7%9A%84%E8%84%9A%E6%9C%ACie-css3-htc/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值