2012-11-29 55 views
0

所以我很熟悉使用过滤器和PIE只是一个简单的梯度,但我会怎么做多停止/使用同样的工具?:多停线性渐变为IE 7-10

background-image: -moz-linear-gradient(center bottom , #0C355C 0%, #082540 50%, #0C355C 51%, #0F4476 100%); 
background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #0C355C), color-stop(0.5, #082540), color-stop(0.51, #0C355C), color-stop(1, #0F4476)); 
开始梯度
+0

http://www.colorzilla.com/梯度编辑器/(简单的方法) – BLSully

回答

1

您应该使用这样的:

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

例:

background: #1e5799; /* Old browsers */ 
background: -moz-linear-gradient(top, #1e5799 0%, #2989d8 50%, #207cca 51%, #7db9e8 100%); /* FF3.6+ */ 
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#1e5799), color-stop(50%,#2989d8), color-stop(51%,#207cca), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */ 
background: -webkit-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */ 
background: -o-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* Opera 11.10+ */ 
background: -ms-linear-gradient(top, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* IE10+ */ 
background: linear-gradient(to bottom, #1e5799 0%,#2989d8 50%,#207cca 51%,#7db9e8 100%); /* W3C */ 
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=0); /* IE6-9 */ 
+1

IE渐变过滤器只允许2色停止(第一次和最后一次),如果需要3次或更多次,它不会帮助OP太多。 – cimmanon

+0

是的 - 这是一个问题。这可以用Pie来完成吗?或者我有去图像的路线..? – user82302124

+0

@ user82302124:PIE不会在这里帮助,传统的图像是最好的选择 – defau1t