css3 渐变 兼容

.gradient{

    background: #000000;

    background: -moz-linear-gradient(top,  #000000 0%, #ffffff 100%);

    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#ffffff));

    background: -o-linear-gradient(top,  #000000 0%,#ffffff 100%);

    background: -ms-linear-gradient(top,  #000000 0%,#ffffff 100%);

    background: linear-gradient(to bottom,  #000000 0%,#ffffff 100%);

filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#ffffff',GradientType=0 );

}

:root .gradient{filter:none;}  //兼容IE9

we

posted @ 2016-03-25 14:04  刘家三胖  阅读(190)  评论(0编辑  收藏  举报