2012-10-26 79 views

回答

9

我发现这个,效果很好。 http://www.colorzilla.com/gradient-editor/

我有一些代码可以用作模板。

background: #1e5799; /* Old browsers */ 

background: -moz-linear-gradient(-45deg, #1e5799 0%, #2989d8 50%, #207cca 63%, #7db9e8 100%); /* FF3.6+ */ 

background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#1e5799), color-stop(50%,#2989d8), color-stop(63%,#207cca), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */ 

background: -webkit-linear-gradient(-45deg, #1e5799 0%,#2989d8 50%,#207cca 63%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */ 

background: -o-linear-gradient(-45deg, #1e5799 0%,#2989d8 50%,#207cca 63%,#7db9e8 100%); /* Opera 11.10+ */ 

background: -ms-linear-gradient(-45deg, #1e5799 0%,#2989d8 50%,#207cca 63%,#7db9e8 100%); /* IE10+ */ 

background: linear-gradient(135deg, #1e5799 0%,#2989d8 50%,#207cca 63%,#7db9e8 100%); /* W3C */ 

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1e5799', endColorstr='#7db9e8',GradientType=1); /* IE6-9 fallback on horizontal gradient */ 
+0

感谢您的回答,但我已经尝试过同样的发电机。 问题是,它几乎不可能使它看起来像我的按钮:( – Fl0R1D3R

2

这是为了得到适当的梯度对角线的风格在你的模板的方式:

background: linear-gradient(-40deg, #4378bf 18%,#3689ce 48%,#428fd0 59%,#8fb3da 100%);