开发者

Create a radial gradient for Internet Explorer 6/7/8

To create a linear gradient in Internet Explorer i used to adopt this (terrible) code:

filter: progid:DXImageT开发者_JAVA技巧ransform.Microsoft.gradient(startColorStr='#282828', EndColorStr='#185976');

I wonder wether exists a way to create a radial gradient using filter and DXImageTransoform ?


Live Demo

#element{
    background: #fff; /* The color you want for the radial gradient */
    width:100px; 
    height:100px;
    filter:progid:DXImageTransform.Microsoft.Alpha(opacity=100, finishopacity=0, style=2);
}

Link where I got the info

Radial Gradient

For the Radial Gradient we have to create a div-elements. This element is a Overlay for the background. Than we'll use the Alpha-Filter. Alpha will make this element transparent in a special style. style=2 is a radial alpha. This means that the center of the element will be full colored (opacity=100) and the opacity will lose to the edges (finishopacity=0)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜