渐变不适用于i - e 7,8

时间:2013-11-14 11:27:46

标签: html5 internet-explorer css3 internet-explorer-8 internet-explorer-7

我正在尝试将我的背景显示为渐变,但它无法正常工作,这是我的代码

.content1 {
    font-size: 16px;
    font-weight: lighter;
    line-height: 1.1em;
    margin-top: -30px;
    background:filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=0px, OffY=0px, Color=#666666);
    -ms-filter: "progid:DXImageTransform.Microsoft.dropshadow(OffX=0px, OffY=0px, Color=#666666)";
    background: -webkit-gradient(center,0 0,41,0 0,0, from(#D06494), to(#401246));
    background:-webkit-radial-gradient(0% 0%, ellipse cover, #D06494 0%, #401246 41%); 
    background:-moz-radial-gradient(0% 0%, ellipse cover, #D06494 0%, #401246 41%); 
    background:-o-radial-gradient(0% 0%, ellipse cover, #D06494 0%, #401246 41%); 
    background: -ms-radial-gradient(0% 0%, ellipse cover, #D06494 0%, #401246 41%); radial-gradient(ellipse at 0% 0%, #D06494 0%, #401246 41%);
    overflow: hidden;
    padding: 25px 40px 50px;
}

请帮助我,该怎么办?

1 个答案:

答案 0 :(得分:0)

IE6-9 使用过滤器而不是-ms-filter:

.content1 {
    /* IE7, IE8, IE9 */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#D06494', endColorstr='#401246',GradientType=0 ); 
}