2013-05-08 77 views
-1

我見過的CSS漸變屬性,並想知道如果這些類型的漸變可以完成與羅盤或香草CSS瀏覽器?我似乎無法弄清楚如何去做。這些類型的漸變可以在CSS中完成嗎?

enter image description here

+1

好你試過什麼了?你看過MDN,規格等嗎?是否有任何其他問題讓你感到驚訝,給你留下具體的問題? – Jeroen 2013-05-08 21:51:51

回答

1

是的,他們可以:

background: rgb(252,215,51); 
background: -moz-linear-gradient(top, rgba(252,215,51,1) 50%, rgba(246,185,51,1) 50%); 
background: -webkit-gradient(linear, left top, left bottom, color-stop(50%,rgba(252,215,51,1)), color-stop(50%,rgba(246,185,51,1))); 
background: -webkit-linear-gradient(top, rgba(252,215,51,1) 50%,rgba(246,185,51,1) 50%); 
background: -o-linear-gradient(top, rgba(252,215,51,1) 50%,rgba(246,185,51,1) 50%); 
background: -ms-linear-gradient(top, rgba(252,215,51,1) 50%,rgba(246,185,51,1) 50%); 
background: linear-gradient(to bottom, rgba(252,215,51,1) 50%,rgba(246,185,51,1) 50%); 
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcd733', endColorstr='#f6b933',GradientType=0); 

這是工作:http://jsfiddle.net/KueLJ/1/

注意:在使用http://www.colorzilla.com/gradient-editor/