filter: progid:DXImageTransform.Microsoft.gradient is not working in ie7

前端 未结 4 778
深忆病人
深忆病人 2021-02-02 08:29

I want to apply a gradient background color to my div.

For IE I have used the property:

filter: progid:DXImageTransform.Microsoft.gradient(s         


        
4条回答
  •  旧巷少年郎
    2021-02-02 08:59

    This should work:

    background: -moz-linear-gradient(center top , #fad59f, #fa9907) repeat scroll 0 0 transparent;
     /* For WebKit (Safari, Google Chrome etc) */
    background: -webkit-gradient(linear, left top, left bottom, from(#fad59f), to(#fa9907));
    /* For Mozilla/Gecko (Firefox etc) */
    background: -moz-linear-gradient(top, #fad59f, #fa9907);
    /* For Internet Explorer 5.5 - 7 */
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#fad59f, endColorstr=#fa9907);
    /* For Internet Explorer 8 */
    -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#fad59f, endColorstr=#fa9907)";
    

    Otherwise generate using the following link and get the code.

    http://www.colorzilla.com/gradient-editor/

提交回复
热议问题