css – 为Internet Explorer 6/7/8创建径向渐变

前端之家收集整理的这篇文章主要介绍了css – 为Internet Explorer 6/7/8创建径向渐变前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
要在Internet Explorer中创建一个线性渐变,我曾经采用这个(可怕的)代码

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

我不知道有没有存在一种使用过滤器和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

径向梯度

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)

原文链接:https://www.f2er.com/css/216949.html

猜你在找的CSS相关文章