CSS - gradient set for IE

前端 未结 2 907
夕颜
夕颜 2021-01-28 17:07

How do I set gradient for IE, because I was trying but without any luck, I got it working on chrome, firefox, opera but not in IE

html, body {  
    height: 100%         


        
相关标签:
2条回答
  • 2021-01-28 17:58

    You have no code in there that IE supports. Use colorzilla to create cross-browser gradients:

    background: #bde25e; /* Old browsers */
    background: -moz-linear-gradient(top, #bde25e 2%, #8bb31d 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(2%,#bde25e), color-stop(100%,#8bb31d)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #bde25e 2%,#8bb31d 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #bde25e 2%,#8bb31d 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #bde25e 2%,#8bb31d 100%); /* IE10+ */
    background: linear-gradient(to bottom, #bde25e 2%,#8bb31d 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bde25e', endColorstr='#8bb31d',GradientType=0 ); /* IE6-9 */
    
    0 讨论(0)
  • 2021-01-28 18:07

    You have to use this in IE,

    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#BDE25E ', endColorstr='#8BB31D ');
    
    0 讨论(0)
提交回复
热议问题