IE前端CSS处理小结(demo下载)

背景色渐变可以这样写

  background-image: -webkit-linear-gradient(to top, #060607, #292829);
  background-image:linear-gradient(to top, #060607, #292829);
  background: -ms-linear-gradient(#060607 0%,#292829 100%); /** IE9 IE10 **/
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292829',endColorstr='#060607',grandientType=1); /** IE7 **/ 
-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292829',endColorstr='#060607',grandientType=1); /** IE8 

整理几个IE兼容性设置的脚本

    <!--[if  lt IE 9]>
        <script src="/skin/lib/js/IE9.js"></script>
        <script src="/skin/lib/js/html5shiv.js"></script>
        <script src="/skin/lib/js/respond.min.js"></script>
         <script src="/skin/lib/js/PIE_IE678.js"></script>
         <script src="/skin/lib/js/selectivizr-min.js"></script>
    <![endif]-->


说明一下这几个脚本对应的功能

Respond.js:  https://github.com/scottjehl/respond 让旧版本的游览器支持媒体查询,IE你懂的~

IE9.js: https://code.google.com/p/ie7-js/ 修复从IE6到IE9的很多bug和缺损功能(这个我没感觉到实际用处)

CSS3Pie: http://css3pie.com/download/  可以帮助IE78针对圆角显示的兼容,IE6没测试过。背景色渐变时在IE7下针对body标签的背景渐变无效。另外php环境中使用时引入的是PIE.php,不是PIE.htc。

html5shiv.js: https://code.google.com/p/html5shiv这个作用是让IE8及更低版本的IE识别section、article、nav等HTML5元素。

selectivize: http://www/selectivizr.com :让IE678支持::first-child等高级CSS选择符,感觉蛮好用的

borderBoxModel.js: https://github.com/albertogasparin/borderBoxModel 让IE6和IE7支持box-sizing属性,box-sizing用来做响应式比较有用,可以让该属性的元素不会被padding撑开,保证其原始大小。

PHP写了个小demo,下载地址

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值