为Internet Explorer 6/7/8创建径向渐变 [英] Create a radial gradient for Internet Explorer 6/7/8
问题描述
要在Internet Explorer中创建一个线性渐变,我曾经采用这个(可怕的)代码:
filter:progid:DXImageTransform.Microsoft。渐变(startColorStr ='#282828',EndColorStr ='#185976');
我不知道wether存在一种创建径向渐变的方法使用过滤器和DXImageTransoform?
#element {
background:#fff; / *你想要的径向渐变的颜色* /
width:100px;
height:100px;
filter:progid:DXImageTransform.Microsoft.Alpha(opacity = 100,finishopacity = 0,style = 2);
}
径向渐变 b
对于Radial Gradient,我们必须创建一个div元素。这个元素
是背景的覆盖。比我们将使用Alpha过滤器。
Alpha将使此元素以特殊样式透明。 style = 2
是一个径向alpha。这意味着元素的中心将是
全彩色(opacity = 100),不透明度将损失到边缘
(finishopacity = 0)
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 ?
#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);
}
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)
这篇关于为Internet Explorer 6/7/8创建径向渐变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!