Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#282828', EndColorStr='#185976');

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
502 views
Welcome To Ask or Share your Answers For Others

1 Answer

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)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...