实现跨浏览器的背景渐变

/*背景渐变*/
.linear{
    width:100%;
    height:600px;
    background-color:#fff;/*若浏览器不支持渐变,则显示这个背景色*/
    background: -ms-linear-gradient(left,#dbecf6 0%,#C0D9ED 100%);/* IE11 */
    background:-moz-linear-gradient(top,#dbecf6,#fdfdfd)no-repeat;/*火狐*/
    background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#dbecf6), to(#fdfdfd))no-repeat;/*谷歌*/
    background-image: -webkit-gradient(linear,left bottom,left top,color-start(0, #dbecf6),color-stop(1, #fdfdfd))no-repeat;/* Safari*/
    filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#dbecf6', endColorstr='#fdfdfd')no-repeat; /*IE6 & IE7*/
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#dbecf6', endColorstr='#fdfdfd')"no-repeat; /* IE8 */
}
/*背景渐变结束*/

posted @ 2015-10-30 16:54  SKILL·NULL  阅读(211)  评论(0编辑  收藏  举报